News for hackers. Stuff that matters.
Re:Chrome breaks the Web by mathias on Monday November 06, 2017 @12:13PM (#15636917)
> Which means you can’t practically use the new form without feature detection.

That does not follow.

`{ capture: true }` works in both, since it’s an object, and thus truthy.

There’s no need for feature detection in the case you describe.

Sadly, that’s the whole premise of this article.

It’s only a problem if you want `capture: false` combined with other options — since you’d need to pass in an object, that would be truthy in the old implementations expecting a boolean instead. But then again, the additional options wouldn’t be supported in those old implementations either.

I’m confused — what’s the actual use case that’s breaking here?

Re:Chrome breaks the Web by mediumdeviation on Monday November 06, 2017 @12:40PM (#15637124)
In older browsers, useCapture is NOT an optional parameter, and in most cases you do NOT want to use event capture instead of event bubbling. There's no trivial way to support addEventListener(event, handler, { passive: true }) on both new and old browsers without that really ugly feature detection code in the article.
Re:Chrome breaks the Web by mathias on Monday November 06, 2017 @02:22PM (#15638169)
> In older browsers, useCapture is NOT an optional parameter

Which browsers are those?