mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Remove PDFViewerApplication.initPassiveLoading
and directly invoke the open
-method from the extension-specific code
This old method is essentially just adding, a small amount of, unnecessary indirection and we can easily invoke `PDFViewerApplication.open` directly from the extension-specific code instead.
This commit is contained in:
parent
b5e00e1fae
commit
ea1c910a66
4 changed files with 17 additions and 46 deletions
|
@ -417,12 +417,11 @@ class Preferences extends BasePreferences {
|
|||
}
|
||||
|
||||
class ExternalServices extends BaseExternalServices {
|
||||
initPassiveLoading(callbacks) {
|
||||
// defaultUrl is set in viewer.js
|
||||
initPassiveLoading() {
|
||||
ChromeCom.resolvePDFFile(
|
||||
AppOptions.get("defaultUrl"),
|
||||
function (url, length, originalUrl) {
|
||||
callbacks.onOpenWithURL(url, length, originalUrl);
|
||||
viewerApp.open({ url, length, originalUrl });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue