browser.addEventListener(LOAD_EVENT, this.func, true); 
browser.addEventListener(LOAD_EVENT, this.func, true); 
function WebLoadingListener(driver, toCall) {    var listener = this;	var browser = Utils.getBrowser(driver.context);	    this.func = function(event) {        // Is there a meta refresh?        // var doc = Utils.getDocument(driver.context);		var doc = event.originalTarget;        var result = doc.evaluate("/html/head/meta[@http-equiv]", doc, null, ORDERED_NODE_ITERATOR_TYPE, null);        var element = result.iterateNext();        while (element) {            if ("refresh" == element.getAttribute("http-equiv").toLowerCase()) {                var content = element.getAttribute("content");                if (content) {                    var bits = content.split(';');                    if (bits[0] - 0 === 0) {                        // We have an instant refresh, so return                        return;                    }                }            }            element = result.iterateNext();        }        WebLoadingListener.removeListener(browser, listener);        toCall(event);    }	browser.addEventListener(LOAD_EVENT, this.func, true);}
4983	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4983/3d58fefd2379fe19ae5bc4540e46171c91481d00/webLoadingListener.js/clean/firefox/src/extension/components/webLoadingListener.js