Add url check.
This commit is contained in:
parent
11e84b2b7b
commit
a794319845
@ -164,10 +164,13 @@ PdfStreamConverter.prototype = {
|
|||||||
},
|
},
|
||||||
onStopRequest: function() {
|
onStopRequest: function() {
|
||||||
var domWindow = getDOMWindow(channel);
|
var domWindow = getDOMWindow(channel);
|
||||||
let requestListener = new RequestListener(new ChromeActions);
|
// Double check the url is still the correct one.
|
||||||
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
if (domWindow.document.documentURIObject.equals(aRequest.URI)) {
|
||||||
requestListener.receive(event);
|
let requestListener = new RequestListener(new ChromeActions);
|
||||||
}, false, true);
|
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
|
||||||
|
requestListener.receive(event);
|
||||||
|
}, false, true);
|
||||||
|
}
|
||||||
listener.onStopRequest.apply(listener, arguments);
|
listener.onStopRequest.apply(listener, arguments);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user