Closed
Bug 935120
Opened 11 years ago
Closed 7 years ago
Alias sdk/events to `events` for node
Categories
(Add-on SDK Graveyard :: General, defect, P3)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: jsantell, Unassigned)
References
Details
Attachments
(1 file)
Updated•11 years ago
|
Priority: -- → P3
Reporter | ||
Comment 1•11 years ago
|
||
* Moved `sdk/event/target` to `node/events` -- changed exposed object from `EventTarget` to `EventEmitter`. No deprecation until we're ready.
* Added `removeAllListeners(type)` to EventEmitter. Similar to off(target) and off(target, type).
* Added `listeners(type)` to return listener count
* Added `emitter.emit` return boolean indicating if there were any listeners listening
* Added static method `EventEmitter.listenerCount()`, same as listeners(type)
* Added events 'newListener' and 'removeListener' to be fired upon adding/removing listeners.
* Added alias for `on`: `addListener`
* Node's `setMaxListeners()` was noop'd, but not implemented here -- may incur too much overhead.
All this is for node parity.
Attachment #8357457 -
Flags: review?(evold)
Comment 2•11 years ago
|
||
Comment on attachment 8357457 [details] [review]
node's event
It looks like this patch will add `addListener` api to everything that implements EventTarget. Irakli are you ok with this?
Attachment #8357457 -
Flags: feedback?(rFobic)
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → jsantell
Reporter | ||
Comment 3•11 years ago
|
||
For clarity, this will add all of these methods to anything that implements EventTarget (which is alised to node EventEmitter)
Comment 4•11 years ago
|
||
Comment on attachment 8357457 [details] [review]
node's event
Assuming that Irakli says the api change is alright r+
Attachment #8357457 -
Flags: review?(evold) → review+
Comment 5•11 years ago
|
||
Comment on attachment 8357457 [details] [review]
node's event
Jordan we had a chat about it on IRC and I had some arguments against this change. This does not means I can't be convinced otherwise, but right now
I'm saying no as I don't see a much value in doing this.
Feel free to followup and convince me I'm wrong if you still disagree.
Attachment #8357457 -
Flags: feedback?(rFobic) → feedback-
Reporter | ||
Comment 6•11 years ago
|
||
Nah, we're in agreement -- putting this on hold until we figure out what to do with these node modules
Reporter | ||
Comment 7•11 years ago
|
||
Unassigning myself from bugs I haven't gotten around to
Assignee: jsantell → nobody
Comment 8•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•