Fixed repeat single-file loading with Files.importFromURL() and Files.linkFromURL() (have to use the "pageload" event rather than "load" -- thanks Simon)

This commit is contained in:
Dan Stillman 2006-08-08 07:05:05 +00:00
parent 425d806307
commit b5cb0e3a92

View file

@ -1955,7 +1955,7 @@ Scholar.Files = new function(){
var browser = Scholar.Browser.createHiddenBrowser();
browser.addEventListener("load", function(){
Scholar.Files.importFromDocument(browser.contentDocument, sourceItemID);
browser.removeEventListener("load", arguments.callee, true);
browser.removeEventListener("pageshow", arguments.callee, true);
Scholar.Browser.deleteHiddenBrowser(browser);
}, true);
browser.loadURI(url, null, null, null, null);
@ -1966,7 +1966,7 @@ Scholar.Files = new function(){
var browser = Scholar.Browser.createHiddenBrowser();
browser.addEventListener("load", function(){
Scholar.Files.linkFromDocument(browser.contentDocument, sourceItemID);
browser.removeEventListener("load", arguments.callee, true);
browser.removeEventListener("pageshow", arguments.callee, true);
Scholar.Browser.deleteHiddenBrowser(browser);
}, true);
browser.loadURI(url, null, null, null, null);