This article is for XUL/JavaScript developers who want to have custom code executed each time a new page is loaded in browser/mail. If you need finer control over custom code execution—for example, as documents are loading or when tabs are switched—see Progress Listeners. Progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events. Progress listeners implement the nsIWebProgressListener interface. Creating an overlay On page load - MDC On page load - MDC
Mobile/Fennec/CodeSnippets Here you should find a set of useful code snippets to help you work with Fennec. Although Fennec is built on XUL and JS, like Firefox, the architecture between Firefox and Fennec is different. Each snippet normally includes some code to run at initialization. These are best run using a load listener. These snippets assume they are run in the context of a browser window. Load Listener Mobile/Fennec/CodeSnippets
Detecting page loads in a Firefox Extension Detecting page loads in a Firefox Extension Posted: September 15th, 2008 | Author: Tim | Filed under: coding, firefox extensions | Tags: addeventlistener, detecting, event, Firefox Extension, gbrowser, page loads | 4 Comments » Detecting page loads is a useful ability. It’s easy enough to throw in a gBrowser.addEventListener(“load”, function_name, true);
DOMContentLoaded
Progress Listeners - MDC Progress Listeners - MDC Progress Listeners Progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events. Progress listeners implement the nsIWebProgressListener interface. Note that if you just want to execute your code each time a page loads, you can use an an easier method, onPageLoad(). Note that onPageLoad does not fire for back button clicks. In the examples below the progress listener is attached to the tabbrowser, which means you don't get any notifications for inactive tabs.
This is frustrating me. How come the progress listener does not get called for a page loading in a tab that does not have focus?! I can't figure out why the Mozilla interface doesn't support this. addProgressListener for ALL Tabs?! addProgressListener for ALL Tabs?!
The "close" event handler is not working, any help • mozillaZine The "close" event handler is not working, any help • mozillaZine I got my close event worked.. All I worked was, removed the "alert()"s and it worked a couple of times. But again started not to work.. I then removed try{} and catch{} blocks (catch again had an "alert()") and it works every time now.
How to get tab id from "DOMContentLoaded" event, Firefox - Unix
Event Object Last updated: March 15th, 2009 The Event object keeps tracks of various events that occur on the page, such as the user moving the mouse or clicking on the link, and allows you to react to them inside your scripts. Related Tutorials JavaScript Kit- Event Object JavaScript Kit- Event Object
[Project_owners] Getting Source Tab When Listening to http-on-mo
Gecko-Specific DOM Events - MDC
Events - MDC Events - MDC « XUL Reference home The following tables describe the event handler that are valid for most XUL elements. The events listeners can be attached using addEventListener and removed using removeEventListener .
addProgressListener for ALL Tabs?!
Getting a Progress Listener to work Following from the Event listeners & logging browsing session this topic is about the NSIWebProgressListener object. And then tried to incorporate a progress listener to my overlay. The resulting code is below and it didn't work. My questions are at the bottom of this post and perhaps they are not so much specific to my extension, so before troubling reading the following code just skip to the end of the post. Code: Select all const STATE_START = Components.interfaces.nsIWebProgressListener.STATE_START;const STATE_STOP = Components.interfaces.nsIWebProgressListener.STATE_STOP;window.addEventListener("load", function(e) {myext.onLoad(e);}, false); Getting a Progress Listener to work
Hi, guys, I am just starting to learn FF ext, I am trying to add ProgressListener to each Tab when Tab is created, then record some browsing history for each tab, for example, last visited url, load counts, etc, so if I have 5 opened tabs, I should have 5 records for last visited url, load counts, etc. What I am doing right now is: 1. add load and unload event listeners for window, when window load, I add tabcontainer listener to catch actions to tab. Code: Select all How to add ProgressListener to each Tab How to add ProgressListener to each Tab
Event listeners & logging browsing session Hello, I am developing an extension that should log user browsing behavior. Things that I am interested in are parameters like: url's browsedlink clickthroughtime spent on pageisbookmarkedetc What I have considered to do is use a function appendLog(url) on every page/tab load. There are several sample codes provided in the MDC but in order not to register log entries on every new window load or frame load i have used the solution proposed in: http://developer.mozilla.org/en/docs/Code_snippets:Tabbed_browser#Detecting_page_load. But I cannot get this to work. There are two event listeners attached on window loads