Skip to content

Conditionally set attributes in EuiMutationObserver options#2180

Merged
thompsongl merged 6 commits intoelastic:masterfrom
thompsongl:accordion-observer-attributes
Jul 31, 2019
Merged

Conditionally set attributes in EuiMutationObserver options#2180
thompsongl merged 6 commits intoelastic:masterfrom
thompsongl:accordion-observer-attributes

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented Jul 30, 2019

Summary

Resurrecting #2159.

Originally, we thought that the errors were caused by an incorrectly implemented MutationObserver polyfill, but it's more likely that the spec has been updated since both the polyfill and IE11 implemented the spec.

Adding attributes to the observer options correctly applies the attributesFilter option and prevents errors in IE11.

Checklist

- [ ] Checked in dark mode
- [ ] Checked in mobile

  • Checked in IE11 💀 and Firefox

- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@thompsongl thompsongl requested a review from chandlerprall July 30, 2019 21:22
Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Verified works in IE

image

@thompsongl thompsongl changed the title Add attributes to EuiAccordion MutationObserver options Conditionally set attributes in EuiMutationObserver options Jul 31, 2019
@thompsongl thompsongl requested a review from chandlerprall July 31, 2019 13:31
Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM!

@thompsongl thompsongl merged commit 09f2b5b into elastic:master Jul 31, 2019
@thompsongl thompsongl deleted the accordion-observer-attributes branch July 31, 2019 16:02
thompsongl added a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
…tic#2180)

* add attributes option

* CL

* use mutationObserver as the keeper of spec logic

* update CL

* clone
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.

3 participants