polyfills
polyfills copied to clipboard
ShadyDOM polyfill incompatible when MooTools loaded in IE 11
Description
If you load a "compat" version of MooTools on a webpage, ShadyDOM will throw exceptions in these locations:
https://github.com/webcomponents/polyfills/blob/c6021490e0fa172dc389de2e806b83ef0ffb11bf/packages/shadydom/src/patches/Node.js#L200
https://github.com/webcomponents/polyfills/blob/c6021490e0fa172dc389de2e806b83ef0ffb11bf/packages/shadydom/src/patches/Node.js#L207
This is because MooTools mutates Document in a way that breaks instanceof checks.
Example
Visit the example in Internet Explorer 11 to see the runtime exceptions:
https://petermikitsh.github.io/cheatsheets-web/?path=/story/demos--web-components-moo-tools-ie-11
Source code: https://github.com/petermikitsh/cheatsheets-web/blob/b6ef632ba45631e5a04bf0ed30860b190eb0ca88/static/WebComponentsIE11.html#L1
Steps to reproduce
- Load a "compat" version of MooTools
- Add the webcomponents polyfills
- Use a web component and see the exception
Invalid operand to 'instanceof': Function expected
Expected behavior
No runtime exception: the correct webpage looks like this (shown in Chrome for example purposes):
Actual behavior
Runtime exception
Version
Latest
Browsers affected
- [ ] Chrome
- [ ] Firefox
- [ ] Edge
- [ ] Safari
- [x] IE 11 (tested in Windows 7)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.