Closed Bug 1603035 Opened 2 years ago Closed 2 years ago

Return a function from EventEmitter.on that removes the event listener when called

Categories

(DevTools :: Shared Components, task, P3)

task

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

This can be useful if the consumer don't want to keep the target around

This will be helpful when consumers don't want to
keep the target around.
A test is added to ensure this work as expected (and
was failing if the returned function does not call
EventEmitter.off).

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ae02ae71f846
Return a function from EventEmitter.on that removes the event listener when called. r=rcaliman.
Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e81d6fea3194
Return a function from EventEmitter.on that removes the event listener when called. r=rcaliman.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.