How can we improve the Microsoft Edge developer experience?

Implement 'once' event listener option

The DOM Standard defines a 'once' option for addEventListener() which causes the callback to only be called once, upon the next occurrence of the given event type, after which the listener gets automatically removed:
https://dom.spec.whatwg.org/#dom-addeventlisteneroptions-once

The effect is similar to jQuery's popular $.one() method.

CanIUse entry: http://caniuse.com/#feat=once-event-listener
MDN article: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters

159 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Chris Rebert shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base