Closed
Bug 651102
Opened 13 years ago
Closed 13 years ago
Document new worker event 'detach'
Categories
(Add-on SDK Graveyard :: Documentation, defect, P2)
Add-on SDK Graveyard
Documentation
Tracking
(Not tracked)
RESOLVED
FIXED
1.0
People
(Reporter: ochameau, Assigned: wbamberg)
References
Details
(Whiteboard: [cherry-pick-1.0b5])
Attachments
(1 file, 2 obsolete files)
2.63 KB,
patch
|
myk
:
review+
ochameau
:
feedback+
|
Details | Diff | Splinter Review |
A new `detach` event is dispatched on worker object when target document unload. (tab close, window close or document reload) I sent a first patch that add some lines in worker.md, but I remember that there is others locations to add such documentation ?
Reporter | ||
Comment 1•13 years ago
|
||
Following bug 607601, we need to document: 1/ behavior of all Worker objects: They are destroyed on document unload, it's obvious for page-mod, but it can be more complicated in tab.attach. (if we call attach before the tab is ready, when it loads an about:blank document before the real page) 2/ And they dispatch a new event called `detach` when they are manually or automatically destroyed.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → wbamberg
Updated•13 years ago
|
Priority: -- → P2
Target Milestone: --- → 1.0
Reporter | ||
Comment 2•13 years ago
|
||
Here is a first step to provide document in interfaces. Then we will need to add some notes in: - content script guide to speak about 'detach' event http://127.0.0.1:8888/dev-guide/addon-development/web-content.html - page-mod doc to tell that workers are destroyed on tab close or the document is unloaded from the tab [to make it simple, when the location change, but in reality, it's only when document goes out from the bfcache] http://127.0.0.1:8888/packages/addon-kit/docs/page-mod.html
Attachment #526963 -
Attachment is obsolete: true
Attachment #528586 -
Flags: review?
Updated•13 years ago
|
Attachment #528586 -
Flags: review? → review?(wbamberg)
Assignee | ||
Comment 3•13 years ago
|
||
> Then we will need to add some notes in:
> - content script guide to speak about 'detach' event
> http://127.0.0.1:8888/dev-guide/addon-development/web-content.html
Hm. I didn't do this because we don't really talk explicitly about worker in that guide, because for the most part worker's APIs are exposed through higher-level APIs.
Apart from listening to page-mod's detach event, are there other obvious applications for detach that need to be captured here?
Attachment #528586 -
Attachment is obsolete: true
Attachment #528586 -
Flags: review?(wbamberg)
Attachment #529757 -
Flags: review?(myk)
Attachment #529757 -
Flags: feedback?(poirot.alex)
Comment 4•13 years ago
|
||
Comment on attachment 529757 [details] [diff] [review] Document worker's detach event in worker and page-mod r=myk, a=myk for checkin during freeze
Attachment #529757 -
Flags: review?(myk) → review+
Updated•13 years ago
|
Whiteboard: [cherry-pick-wanted]
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 5•13 years ago
|
||
Fixed by: https://github.com/mozilla/addon-sdk/commit/3f41c8285b25d3db9b5a0e109c3e5da860c41810
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [cherry-pick-wanted] → [cherry-pick-1.0b5]
Comment 6•13 years ago
|
||
Cherry-pick to 1.0b5 branch: https://github.com/mozilla/addon-sdk/commit/d9c48a6f6a4da64c3b4b1f8e76fac8b2f000f36d
Reporter | ||
Comment 7•13 years ago
|
||
(In reply to comment #3) > Hm. I didn't do this because we don't really talk explicitly about worker in > that guide, because for the most part worker's APIs are exposed through > higher-level APIs. > > Apart from listening to page-mod's detach event, are there other obvious > applications for detach that need to be captured here? The only common use case I'm thinking about is `tab.attach` in order to detect location change.
Reporter | ||
Comment 8•12 years ago
|
||
Comment on attachment 529757 [details] [diff] [review] Document worker's detach event in worker and page-mod I forgot to change the flag long time ago.
Attachment #529757 -
Flags: feedback?(poirot.alex) → feedback+
You need to log in
before you can comment on or make changes to this bug.
Description
•