Error in IE11: SCRIPT445: Object doesn't support this action
Description
patch-events.js causes an error in IE.
Live Demo
Run this pen in IE11:
https://codepen.io/anon/pen/dJerjB
Steps to Reproduce
See the pen in IE11. You can use http://crossbrowsertesting.com to test the pen in IE11 for free (click "Change View" in the pen to see a link to "Open on CrossBrowserTesting".
Expected Results
no error
Actual Results
You'll get an error
SCRIPT445: Object doesn't support this action
pointing to this line:
https://github.com/webcomponents/shadydom/blob/2e4b73247a2bf413148acb2970f2a0dea886c837/src/patch-events.js#L178
(on column 9, and based on the source map)
Browsers Affected
- [ ] Chrome
- [ ] Firefox
- [ ] Edge
- [ ] Safari 9
- [ ] Safari 8
- [x] IE 11
Versions
[email protected], using https://unpkg.com/@webcomponents/[email protected]/webcomponents-sd-ce.js
The other error that also appears in the console is reported in https://github.com/webcomponents/custom-elements/issues/135.
@trusktr I believe you're getting this error because you're missing a polyfill for the CustomEvent constructor (which isn't supported in IE11). It's included in webcomponents-lite.js.