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

127 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Chris RebertChris Rebert shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base