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:
parent
425d806307
commit
b5cb0e3a92
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue