Ensure that the necessary src/* dependencies are loaded before the viewer, when it's run with gulp server
(issue 7448)
Fixes 7448.
This commit is contained in:
parent
e908b71309
commit
4342993a3f
@ -169,9 +169,14 @@ function webViewerLoad() {
|
|||||||
var config = getViewerConfiguration();
|
var config = getViewerConfiguration();
|
||||||
//#if !PRODUCTION
|
//#if !PRODUCTION
|
||||||
require.config({paths: {'pdfjs': '../src', 'pdfjs-web': '.'}});
|
require.config({paths: {'pdfjs': '../src', 'pdfjs-web': '.'}});
|
||||||
require(['pdfjs-web/app', 'mozPrintCallback_polyfill.js'], function (web) {
|
require(['pdfjs-web/pdfjs'], function () {
|
||||||
window.PDFViewerApplication = web.PDFViewerApplication;
|
// Ensure that src/main_loader.js has loaded all the necessary dependencies
|
||||||
web.PDFViewerApplication.run(config);
|
// *before* the viewer loads, to prevent issues in browsers relying on e.g.
|
||||||
|
// the Promise/URL polyfill in src/shared/util.js (fixes issue 7448).
|
||||||
|
require(['pdfjs-web/app', 'mozPrintCallback_polyfill.js'], function (web) {
|
||||||
|
window.PDFViewerApplication = web.PDFViewerApplication;
|
||||||
|
web.PDFViewerApplication.run(config);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//#else
|
//#else
|
||||||
//window.PDFViewerApplication = pdfjsWebLibs.pdfjsWebApp.PDFViewerApplication;
|
//window.PDFViewerApplication = pdfjsWebLibs.pdfjsWebApp.PDFViewerApplication;
|
||||||
|
Loading…
Reference in New Issue
Block a user