mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Wraps mozL10n to async calls; splits firefox and generic l10n libs.
This commit is contained in:
parent
09d46e94c6
commit
5438ce9b98
28 changed files with 463 additions and 260 deletions
|
@ -16,6 +16,8 @@
|
|||
import { DefaultExternalServices, PDFViewerApplication } from './app';
|
||||
import { BasePreferences } from './preferences';
|
||||
import { DownloadManager } from './download_manager';
|
||||
import { GenericL10n } from './genericl10n';
|
||||
import { PDFJS } from 'pdfjs-lib';
|
||||
|
||||
if (typeof PDFJSDev !== 'undefined' && !PDFJSDev.test('GENERIC')) {
|
||||
throw new Error('Module "pdfjs-web/genericcom" shall not be used outside ' +
|
||||
|
@ -47,6 +49,9 @@ GenericExternalServices.createDownloadManager = function() {
|
|||
GenericExternalServices.createPreferences = function() {
|
||||
return new GenericPreferences();
|
||||
};
|
||||
GenericExternalServices.createL10n = function () {
|
||||
return new GenericL10n(PDFJS.locale);
|
||||
};
|
||||
PDFViewerApplication.externalServices = GenericExternalServices;
|
||||
|
||||
export {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue