Closed
Bug 1031442
Opened 11 years ago
Closed 6 years ago
Add a tab / unload ( or onChange? ) event
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: canuckistani, Unassigned)
References
Details
From David on the mailing list:
"I'm writing a Jetpack addon and see some improvements that could make the tab API easier to use.
One of my goal in my addon is to ease a couple of actions for the user by automating them. So, I want to write code that does things like:
* open a tab at some URL
* fill in a form (login+password for instance) and submit it
* when the form is submitted, click a link to go to another page, etc.
Among other things, I need to know when the current page is unloaded. An "unload" event echoing the "load" event might be a good idea for this use case, so I know when to re-listen for "ready" of the next page (but in the same tab).
What I do now is attach a worker and wait for it to be "detach"-ed, but that's obviously boilerplate-y and takes resources for no good reason."
https://groups.google.com/forum/#!topic/mozilla-labs-jetpack/0uweBvWRpZk
Reporter | ||
Comment 1•11 years ago
|
||
As far as I can tell we only expose tab.on('pageshow'), not 'pagehide'[1] so this bug should be kept open.
1. https://developer.mozilla.org/en-US/docs/Web/Events/pagehide
Updated•10 years ago
|
Priority: -- → P2
Any particular reason there hasn't been any movement on this issue?
this._onTabPageHide = this._emitEvent.bind(this, "pagehide");
wrappedTab.on("pagehide", this._onTabPageHide);
As far as I can tell, it should be as simple as inserting those lines in the appropriate places, no?
Comment 3•6 years ago
|
||
Add-on SDK is no longer supported so resolving bugs as INCOMPLETE
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•