Remove the attachDOMEventsToEventBus functionality, since EventBus instances are able to re-dispatch events to the DOM (PR 10019, bug 1492849 follow-up)

This also removes the old 'pagechange'/'scalechange'/'documentload' events.
This commit is contained in:
Jonas Jenwald 2018-09-20 20:51:50 +02:00
parent 7053b5a146
commit e2e9657ed0
15 changed files with 41 additions and 188 deletions

View file

@ -20,7 +20,9 @@ import {
import {
DefaultTextLayerFactory, TextLayerBuilder
} from './text_layer_builder.js';
import { EventBus, NullL10n, ProgressBar } from './ui_utils.js';
import {
EventBus, getGlobalEventBus, NullL10n, ProgressBar
} from './ui_utils.js';
import { PDFLinkService, SimpleLinkService } from './pdf_link_service.js';
import { DownloadManager } from './download_manager.js';
import { GenericL10n } from './genericl10n.js';
@ -33,6 +35,9 @@ import { PDFViewer } from './pdf_viewer.js';
const pdfjsVersion = PDFJSDev.eval('BUNDLE_VERSION');
const pdfjsBuild = PDFJSDev.eval('BUNDLE_BUILD');
// For backwards compatibility, ensure that events are re-dispatched to the DOM.
getGlobalEventBus(/* dispatchToDOM = */ true);
export {
PDFViewer,
PDFSinglePageViewer,