Skip to content
This repository has been archived by the owner on Mar 19, 2018. It is now read-only.

Need some additional text around add/removeEventListener clearly specifying how equality works #23

Closed
dtapuska opened this issue Jul 21, 2015 · 1 comment

Comments

@dtapuska
Copy link
Collaborator

Take for example:

var f = function(e) {
};

addEventListener("foo", f, false); /use capture false; mayCancel implicitly true/
addEventListener("foo", f, {useCapture: false, mayCancel: true}); /* this should do nothing; since f is already added with those args. */

Likewise:
removeEventListener("foo", f, {useCapture: false, mayCancel: true}); /* this should remove the first added event listener*/

This slightly differs from the text in http://www.w3.org/TR/dom/#dom-eventtarget-removeeventlistener
as the EventListenerOptions object is likely created and destroyed between add/remove calls so we need to enumerate all the configurations of the options to determine if they are equal. This may be specified somewhere how dictionaries behave; but I haven't found a reference to it.

@RByers RByers removed the spec label Jul 27, 2015
@RByers
Copy link
Member

RByers commented Sep 22, 2015

Covered by #19, eg. here

@RByers RByers closed this as completed Sep 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants