Skip to content
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

Use style sheet, remove URL rewriting #58

Merged
merged 1 commit into from
Jun 29, 2020
Merged

Use style sheet, remove URL rewriting #58

merged 1 commit into from
Jun 29, 2020

Conversation

jonathantneal
Copy link
Contributor

This PR changes how <style> and <link rel="stylesheet" /> stylesheets are updated in IE11. Instead of rewriting <link rel="stylesheet" /> tags as <style> tags, the CSSOM StyleSheet text is rewritten.

Benefits

  • Uses cssText instead of createElement and innerHTML, reducing the number of DOM modifications.
  • Preserves linked stylesheet href, removing the need to rewrite internal URLs.
  • Reduces the overall script size and code complexity.

@nuxodin nuxodin merged commit 3854f94 into nuxodin:master Jun 29, 2020
@jonathantneal
Copy link
Contributor Author

Be sure to test this branch before a release. We are probably testing with different sets of data. If it works for both of us, then 👍 👍 .

@nuxodin
Copy link
Owner

nuxodin commented Jun 29, 2020

Works well in my cases 👍

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