Skip to content

Fix ie11 - #36

Merged
rmariuzzo merged 2 commits into
rmariuzzo:masterfrom
legnaleurc:fix-ie11
Feb 11, 2021
Merged

Fix ie11#36
rmariuzzo merged 2 commits into
rmariuzzo:masterfrom
legnaleurc:fix-ie11

Conversation

@legnaleurc

Copy link
Copy Markdown
Contributor

NOTE this PR depends on #19, please merge it first.

Summary:

  1. IE11 cannot access CSSRule.cssText for keyframes rules.
    it is not undefined, it just throw Permission Denied error.
    So we need to reassemble it.

  2. IE11 has very bad performance for HTMLElement.appendChild, so I replace them to simple string.

  3. Use DocumentFragment to avoid unnecessary reflow.

Comment thread src/NewWindow.js Outdated

target.head.appendChild(newStyleEl)
const newStyleEl = target.createElement('style')
newStyleEl.contentText = ruleText.join('\n')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be textContent instead of contentText?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled down your PR, and it should be textContent indeed`

Comment thread src/NewWindow.js Outdated

target.head.appendChild(newStyleEl)
const newStyleEl = target.createElement('style')
newStyleEl.contentText = ruleText.join('\n')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled down your PR, and it should be textContent indeed`

@atg200

atg200 commented Sep 29, 2020

Copy link
Copy Markdown

Is this project still active? I need the ie11 support.

@legnaleurc

Copy link
Copy Markdown
Contributor Author

I believe at the very least this need a rebase to the latest version. (I'll do it later, also some fix for reviewer's comment)
Also #19 is still not merged, not sure if I should just include that diff or not.

@rmariuzzo

rmariuzzo commented Oct 2, 2020 via email

Copy link
Copy Markdown
Owner

@rmariuzzo

Copy link
Copy Markdown
Owner

@legnaleurc you can include it if you want.

@rmariuzzo

Copy link
Copy Markdown
Owner

Whatever you decide, let me know, then I will merge your changes.

ryanewtaylor and others added 2 commits October 6, 2020 01:52
1. IE11 cannot access cssText for keyframes rules
2. performance problem in IE11
@legnaleurc

legnaleurc commented Oct 5, 2020

Copy link
Copy Markdown
Contributor Author

Done.
I kept the commit in #19 so hopefully @ryanewtaylor will still get his credit.

Although this solves problems for IE11, I believe there are some bugs in Edge(non-Edgeium one) while using DocumentFragment.
But I believe this should be another ticket, and maybe not a problem anymore if most of people start using Edgeium.

@rmariuzzo

Copy link
Copy Markdown
Owner

Thank you @legnaleurc! I will take a look soon at it.

@atg200

atg200 commented Feb 11, 2021

Copy link
Copy Markdown

I'm still hoping this can be fixed at some point.

@rmariuzzo
rmariuzzo merged commit 1eeae9b into rmariuzzo:master Feb 11, 2021
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.

6 participants