Closed Bug 880501 Opened 11 years ago Closed 11 years ago

Make EventTarget chainable

Categories

(Add-on SDK Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jsantell, Assigned: jsantell)

Details

Attachments

(1 file)

This way we can return an eventtarget from a method rather than a mixin on an instance with more succinct code.

```
doSomething()
  .on('data', process)
  .on('error', handle)
  .on('end', partyTime);

```
Attached file Pointer to GH PR 1021
Attachment #759522 - Flags: review?(evold)
Comment on attachment 759522 [details]
Pointer to GH PR 1021

Looks great! I just want to make sure Irakli gives it a thumbs up first.
Attachment #759522 - Flags: review?(evold)
Attachment #759522 - Flags: review+
Attachment #759522 - Flags: feedback?(rFobic)
Thanks! Yes, Irakli has given the +1
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/31144bb3eebbe5e216a78be94af8f4db9a0bfa94
Merge pull request #1021 from jsantell/eventTargetChain

Bug 880501: Add chainable methods for EventTarget, r=@erikvold
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #759522 - Flags: feedback?(rFobic)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: