Add url check.
This commit is contained in:
parent
11e84b2b7b
commit
a794319845
1 changed files with 7 additions and 4 deletions
|
@ -164,10 +164,13 @@ PdfStreamConverter.prototype = {
|
||||||
},
|
},
|
||||||
onStopRequest: function() {
|
onStopRequest: function() {
|
||||||
var domWindow = getDOMWindow(channel);
|
var domWindow = getDOMWindow(channel);
|
||||||
|
// Double check the url is still the correct one.
|
||||||
|
if (domWindow.document.documentURIObject.equals(aRequest.URI)) {
|
||||||
let requestListener = new RequestListener(new ChromeActions);
|
let requestListener = new RequestListener(new ChromeActions);
|
||||||
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
||||||
requestListener.receive(event);
|
requestListener.receive(event);
|
||||||
}, false, true);
|
}, false, true);
|
||||||
|
}
|
||||||
listener.onStopRequest.apply(listener, arguments);
|
listener.onStopRequest.apply(listener, arguments);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue