Re: [whatwg/dom] Event delegation via EventListenerOptions (#215)

Would this allow for multiple firings of events that can normally wouldn't fire again for the parent? (`mouseover`/`mouseleave` are the only ones I think of that'd be affected by this)

For example would this fire an event for every delegated child that is `mouseover`-ed?

```js
container.addEventListener('#my-container', event => {
    // do stuff
}, { matches: '.hoverable' })
```

Or would it still behave like current and only fire an event when entering the element the event listener is attached to (assuming it crosses a child that matches)? e.g. Roughly similar to the current code:

```js
container.addEventListener('#my-container', event => {
    // This is only fired on entering #my-container so turns out to be
    // pretty useless for detecting hover over child nodes
    if (event.target.matches('.hoverable')) {
        // do stuff
    }
})
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/215#issuecomment-323675795

Received on Monday, 21 August 2017 08:09:46 UTC