Closed
Bug 598912
Opened 14 years ago
Closed 14 years ago
change "notifications" module to use EventEmitter event registration model
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: irakli, Assigned: irakli)
References
()
Details
Attachments
(1 file, 1 obsolete file)
1.44 KB,
patch
|
myk
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → rFobic
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #477908 -
Flags: review?(myk)
Assignee | ||
Comment 2•14 years ago
|
||
Updated•14 years ago
|
Attachment #477908 -
Flags: review?(myk) → review+
Updated•14 years ago
|
Keywords: checkin-needed
Comment 3•14 years ago
|
||
Wait, why are you changing `this` to be the data? `this` should be the options object to which the data and onClick are attached.
Comment 4•14 years ago
|
||
Comment on attachment 477908 [details] [diff] [review]
Implements changes
The patch itself is not good, because it doesn't update the doc.
Attachment #477908 -
Flags: review-
Comment 5•14 years ago
|
||
Comment on attachment 477908 [details] [diff] [review]
Implements changes
(In reply to comment #3)
> Wait, why are you changing `this` to be the data? `this` should be the options
> object to which the data and onClick are attached.
Erm, right, sorry, I missed that. Thus this still needs to |call| the callback to set `this` appropriately.
Attachment #477908 -
Flags: review+ → review-
Assignee | ||
Comment 6•14 years ago
|
||
Maybe I'm missing something, but change of not using |call| was intentional since that's a way `EventEmitter` works.
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #4)
> Comment on attachment 477908 [details] [diff] [review]
> Implements changes
>
> The patch itself is not good, because it doesn't update the doc.
There is actually nothing to change on the documentation side that's why I don't.
Comment 8•14 years ago
|
||
How is changing the meaning of `this` inside onClick related to EventEmitter? Why would `this` be anything other than the object on which I've defined onClick?
The documentation explicitly mentions what arguments onClick will be passed and this.data.
Assignee | ||
Comment 9•14 years ago
|
||
Sorry Drew it seems that I misunderstood what switching to `EventEmitter` model meant. My understanding was that we'll be sticking to original interface they way it is implemented in browser, nodejs, etc.. But it seems we're not and in that case no change required at all.
If you want to know why IMO binding this is wrong:
https://bugzilla.mozilla.org/show_bug.cgi?id=598983#c3
Now I see that the example in the docs indeed mentions this.data
Assignee | ||
Comment 10•14 years ago
|
||
Updating implementation according to the comments.
Attachment #477908 -
Attachment is obsolete: true
Attachment #481258 -
Flags: review?(myk)
Updated•14 years ago
|
Attachment #481258 -
Flags: review?(myk) → review+
Assignee | ||
Comment 11•14 years ago
|
||
c823f5a6d14b
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 12•14 years ago
|
||
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.
To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
Updated•14 years ago
|
Keywords: checkin-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•