This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 407
addEventListener and removeEventListener doesn't work with EventListenerOptions #737
Comments
@vevnin , thank you for posting the issue, I will check it. |
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 15, 2017
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 15, 2017
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 16, 2017
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 16, 2017
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 16, 2017
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Apr 16, 2017
mhevery
pushed a commit
that referenced
this issue
Apr 21, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please see details about EventListenerOptions specification here:
https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
https://www.chromestatus.com/feature/5745543795965952
The issue is that third parameter of addEventListener and removeEventListener methods is treated as boolean useCapturing parameter. If EventListenerOptions object is used instead then event listener will not be removed with removeEventListener call. This happens because findExistingRegisteredTask task uses reference equality (===) to determine equality of useCapturing parameter. This way it's possible to remove event handler only by passing exactly same object of EventListenerOptions to removeEventListener call.
This behavior seems very counter-intuitive to me. Please add support of EventListenerOptions parameter.
The text was updated successfully, but these errors were encountered: