Skip to content

Remove unnecessary JavaScript function applyStyle() #1220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2019
Merged

Remove unnecessary JavaScript function applyStyle() #1220

merged 1 commit into from
Dec 9, 2019

Conversation

jdufresne
Copy link
Contributor

This function iterated over elements and converted data-* attributes to
style attributes of the same name. Instead of using JavaScript, simply
assign these values as style attributes to begin with. This removes the
JavaScript execution time and reduces the number of JavaScript files
included with the project as well as downloaded at runtime.

This function iterated over elements and converted data-* attributes to
style attributes of the same name. Instead of using JavaScript, simply
assign these values as style attributes to begin with. This removes the
JavaScript execution time and reduces the number of JavaScript files
included with the project as well as downloaded at runtime.
@matthiask
Copy link
Member

Good find!

@matthiask matthiask merged commit cefd8ff into django-commons:master Dec 9, 2019
@jdufresne jdufresne deleted the apply-style branch March 7, 2020 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants