-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 CEv1: Fix innerHTML patch in Safari <= 9 and maybe Yandex (#28086)
* CEv1: Fix innerHTML patch in Safari <= 9 Old Safari has an interesting definition for `Element.p.innerHTML`: the descriptor is non-configurable and the `set` setter is undefined. In the old code, trying to patch this setter throws an error. This leaves the document in a broken state. The first CE to be defined will not properly upgrade the elements that existed were already parsed on the page. Additionally, `innerHTML` will not properly sync-upgrade CEs that are parsed from the string, but they will async-upgrade via the `MutationObserver`. Skipping this `innerHTML` patch shouldn't hurt, since we'll still get the async-upgrade. Safari 9 is sooo old, all we really need here is a best-effort "it kinda works". * Add potential fix for Yandex not having a innerHTML descriptor * Add tests for innerHTML patch * Add browser names to test cases * Fix test skipping
- Loading branch information
1 parent
c6e3be8
commit 67815dc
Showing
3 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters