Closed Bug 850023 Opened 12 years ago Closed 12 years ago

Addition of event indicating page load (including via history)

Categories

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

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 671305

People

(Reporter: benjamin.j.mccann, Assigned: jsantell)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22 Steps to reproduce: I would like an event to listen to each time a page is viewed. This is currently not possible because tabs.on('ready') will not fire with the back/forward buttons because the execution is cached. Similarly, it appears that PageMod's onAttach listener will not work with the forward/back buttons either. This is not necessarily a bug report as I believe it is intended, but may be viewed as a feature request. I am trying to show a sidebar whenever certain pages are viewed (including with forward/back buttons). This seems like a reasonable extension to build and I would imagine the capability should exist in FireFox as it does in Chrome and IE. To determine if a page should have the sidebar, I inject a script using tab.attach that inspects the page and sends back a message indicating whether the sidebar should be displayed. I cannot get this page inspection to work with the forward/back buttons on many sites where execution is cached (news.ycombinator.com is a good example) Actual results: There is no API indicating page load which works with forward/back buttons Expected results: There should be an equivalent of Chrome's chrome.tabs.onUpdated
Blocks: sdk/tabs
Summary: Addition of event indicating page view (including via history) → Addition of event indicating page load (including via history)
Depends on: 671305
Assignee: nobody → jsantell
This will be resolved once bug 671305 is merged -- with that you can bind to the `pageshow` event, which will fire even when loading from the cache (with the forward/back buttons) :)
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.