webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.13k stars 166 forks source link

[ShadyDOM] Event listener options cannot be specified with a function in IE #468

Closed sorvell closed 2 years ago

sorvell commented 2 years ago

Description

ShadyDOM's addEventListener implementation only allows non-boolean event listener options passed in as objects. If a function is passed, the event will always capture, which is incorrect. Instead of checking if the options are an object, we can probably check that they are not a boolean.

Note, noPatch users cannot rely on this patch anyway and need a separate polyfill if they want to use event options.

Browsers affected