This project is archived and is in readonly mode.

#931 ✓invalid
mattcoz

add/removeEvent and add/removeListener should have the ability to set the capture flag

Reported by mattcoz | June 16th, 2010 @ 07:27 PM

This is probably not a common need, but I see no reason not to include it. These functions should have a third parameter for the capture flag, which would then be passed along to the add/removeListener function, which would then pass it along to the add/removeEventListener functions. If it's not included, it behaves exactly the same way as it does now.

Comments and changes to this ticket

  • Sebastian Markbåge

    Sebastian Markbåge June 17th, 2010 @ 01:04 AM

    • State changed from “new” to “invalid”

    This would not be compatible with the current IE versions. You can do certain capture behavior in IE but it doesn't work exactly the same. Even if you do have requirement that you can simulate in IE, it's not common enough to include in the core framework.

    If you don't want to support IE you can just use the native addEventListener syntax which is pretty much exactly the same.

    The Events mixin doesn't currently have bubbling and if it did, it probably wouldn't support the capturing phase. So it doesn't make sense to have it on classes.

    I think a "bind" argument would be a much more useful use of the third argument.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket