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

Update MutationObserverInit.attributeFilter on IE11 usage known issue #5540

Conversation

@danielcaldas
Copy link
Contributor

danielcaldas commented Jan 23, 2020

Summary

When using attributeFilter with MutationObserverInit API for IE11 a syntax error is thrown if one does not provide the property attributes with the value true.

Resources to support the information

  1. My painful experience facing this issue in production.
  2. MutationObserver syntax error on IE11 (stackoverflow)
  3. Pull Request in ampproject addressing this same issue (github)

How to test

  1. Use MutationObserver with attributeFilter.
  2. See that syntax error is thrown.
  3. Add attributes: true to your MutationObserver configuration and see that it fixes the "issue".

Related issues

--

A checklist to help your pull request get merged faster:

  • Summarize your changes
  • Data: link to resources that verify support information (such as browser's docs, changelogs, source control, bug trackers, and tests)
  • Data: if you tested something, describe how you tested with details like browser and version
  • Review the results of the linter and fix problems reported (If you need help, please ask in a comment!)
  • Link to related issues or pull requests, if any
@danielcaldas danielcaldas requested review from a2sheppy and Elchi3 Jan 23, 2020
Copy link
Collaborator

vinyldarkscratch left a comment

Hey there, thanks for your PR, and welcome to BCD! I was able to confirm this behavior, and found that it was not only present in Internet Explorer, but Edge as well. Can we add a note to Edge reading the following?

"Microsoft Edge (EdgeHTML) requires attributes: true when using attributeFilter. If attributes: true is not present, Edge will throw a syntax error. This behavior is not present in Chrome-based editions of Edge."

api/MutationObserverInit.json Outdated Show resolved Hide resolved
Co-Authored-By: Queen Vinyl Darkscratch <vinyldarkscratch@gmail.com>
@danielcaldas danielcaldas requested a review from vinyldarkscratch Jan 28, 2020
Copy link
Collaborator

vinyldarkscratch left a comment

Thank you, looking good to me! Just one little change, and I’d say this is ready to merge.

api/MutationObserverInit.json Outdated Show resolved Hide resolved
@danielcaldas danielcaldas requested a review from vinyldarkscratch Jan 28, 2020
Copy link
Collaborator

vinyldarkscratch left a comment

Awesome, looking great -- thank you very much, let's get this merged!

Oh and once again, welcome to BCD! 🎉

@vinyldarkscratch vinyldarkscratch merged commit 0ad7d76 into mdn:master Jan 28, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Elchi3 Elchi3 removed request for Elchi3 and a2sheppy Feb 17, 2020
@danielcaldas danielcaldas deleted the danielcaldas:update-attributefilter-mutation-observer branch Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.