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

fix(synthetic): Node patches for contains and parentElement #1705

Closed
wants to merge 1 commit into from

Conversation

ekashida
Copy link
Member

@ekashida ekashida commented Feb 4, 2020

Details

IE11 has contains and parentElement descriptors on HTMLElement

Does this PR introduce breaking changes?

  • No, it does not introduce breaking changes.

GUS work item

W-7109631

@@ -514,16 +514,16 @@ export const getInternalChildNodes: (node: Node) => NodeListOf<ChildNode> =
// IE11 extra patches for wrong prototypes
if (hasOwnProperty.call(HTMLElement.prototype, 'contains')) {
defineProperty(
HTMLElement.prototype,
Node.prototype,
Copy link
Contributor

Choose a reason for hiding this comment

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

in IE11, we want to replace HTMLElement.prototype.contains with a fixed implementation, even though it is in the wrong prototype, that's not a problem, but leaking the original implementation is a problem on itself.

@ekashida ekashida closed this Feb 4, 2020
@ekashida ekashida deleted the ekashida/fix-ie11-patches branch February 4, 2020 20:22
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.

None yet

2 participants