mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
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() {
|
||||
var domWindow = getDOMWindow(channel);
|
||||
let requestListener = new RequestListener(new ChromeActions);
|
||||
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
||||
requestListener.receive(event);
|
||||
}, false, true);
|
||||
// Double check the url is still the correct one.
|
||||
if (domWindow.document.documentURIObject.equals(aRequest.URI)) {
|
||||
let requestListener = new RequestListener(new ChromeActions);
|
||||
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
||||
requestListener.receive(event);
|
||||
}, false, true);
|
||||
}
|
||||
listener.onStopRequest.apply(listener, arguments);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue