polyfills
polyfills copied to clipboard
document.addEventListener and document.dispatchEvent do not work on document in IE11 with shadydom
Description
When shadydom is used custom events fired onto document do not work:
Example:
// never gets event
document.addEventListener('my-custom-event', function(e) {
console.log(e)
})
document.dispatchEvent(new CustomEvent('my-custom-event', {bubbles: true, detail: 'payload'})
Firing the event on a DOM-Node however does work:
// gets and logs event
document.getElementById("top").addEventListener('my-custom-event', function(e) {
console.log(e)
})
document.getElementById("top").dispatchEvent(new CustomEvent('my-custom-event', {bubbles: true, detail: 'payload'})
Expected behavior
Firing the custom event on document does work.
Actual behavior
Firing of the custom event on the document does not work, firing on any DOM-Node however works.
Version
webcomponents: 2.5.0 shadydom: 1.80
Browsers affected
- [ ] Chrome
- [ ] Firefox
- [ ] Edge
- [ ] Safari
- [X] IE 11
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.