Closed
Bug 810656
Opened 12 years ago
Closed 12 years ago
Explain how to remove listeners in content scripts when using port
Categories
(Add-on SDK Graveyard :: Documentation, defect, P2)
Add-on SDK Graveyard
Documentation
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: evold, Assigned: wbamberg)
Details
Attachments
(1 file)
https://addons.mozilla.org/en-US/developers/docs/sdk/1.11/dev-guide/guides/content-scripts/using-port.html
The above page explains how to add listeners and emit events, but not how to remove a listener. Also if the `once` method is available that should be mentioned on the link above.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → wbamberg
Priority: -- → P2
Assignee | ||
Comment 1•12 years ago
|
||
So it looks like "once" works, but my example of "removeListener" does not. WOuld you mind taking a look and see if I'm doing anything wrong? https://builder.addons.mozilla.org/package/162389/latest/
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Will Bamberg [:wbamberg] from comment #1)
> So it looks like "once" works, but my example of "removeListener" does not.
> WOuld you mind taking a look and see if I'm doing anything wrong?
> https://builder.addons.mozilla.org/package/162389/latest/
You found a bug! :/
My fork of your example works https://builder.addons.mozilla.org/package/163229/latest/
So removeListener works, except in your test case..
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Will Bamberg [:wbamberg] from comment #1)
> So it looks like "once" works, but my example of "removeListener" does not.
> WOuld you mind taking a look and see if I'm doing anything wrong?
> https://builder.addons.mozilla.org/package/162389/latest/
I made bug 816272 for this.
Assignee | ||
Comment 4•12 years ago
|
||
I'm still not quite sure about this queuing bug (bug 816272). It looks to me as if it only affects page-mod, but that's kind of hard to believe.
Attachment #709261 -
Flags: review?(evold)
Comment 5•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/5257d2f9772c454901d78b9e5733f5626a37c379
Merge pull request #759 from wbamberg/810656
Fix Bug 810656: updated 'Using Port' content script documentation to include removeListener() and once() r=@erikvold
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•12 years ago
|
Attachment #709261 -
Flags: review?(evold) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•