mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 07:38:07 +02:00
Replaces UnsupportedManager with callback.
This commit is contained in:
parent
84a47f8e53
commit
c9cb6a3025
7 changed files with 66 additions and 47 deletions
|
@ -599,6 +599,9 @@ var PDFViewerApplication = {
|
|||
self.progress(progressData.loaded / progressData.total);
|
||||
};
|
||||
|
||||
// Listen for unsupported features to trigger the fallback UI.
|
||||
loadingTask.onUnsupportedFeature = this.fallback.bind(this);
|
||||
|
||||
var result = loadingTask.promise.then(
|
||||
function getDocumentCallback(pdfDocument) {
|
||||
self.load(pdfDocument, scale);
|
||||
|
@ -1465,10 +1468,6 @@ function webViewerInitialized() {
|
|||
document.getElementById('viewFind').classList.add('hidden');
|
||||
}
|
||||
|
||||
// Listen for unsupported features to trigger the fallback UI.
|
||||
PDFJS.UnsupportedManager.listen(
|
||||
PDFViewerApplication.fallback.bind(PDFViewerApplication));
|
||||
|
||||
// Suppress context menus for some controls
|
||||
document.getElementById('scaleSelect').oncontextmenu = noContextMenuHandler;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue