Add 'documentinit'/'documentloaded' events to PDFViewerApplication.load
The new events follow the same naming pattern as the 'pagesinit'/'pagesloaded' events dispatched on `BaseViewer` instances, and the intention is to allow the eventual removal of 'documentload'.
This commit is contained in:
parent
486c843215
commit
7bc4bfcc8b
@ -897,6 +897,9 @@ let PDFViewerApplication = {
|
||||
this.loadingBar.hide();
|
||||
|
||||
firstPagePromise.then(() => {
|
||||
this.eventBus.dispatch('documentloaded', { source: this, });
|
||||
// TODO: Remove the following event, i.e. 'documentload',
|
||||
// once the mozilla-central tests have been updated.
|
||||
this.eventBus.dispatch('documentload', { source: this, });
|
||||
});
|
||||
});
|
||||
@ -1000,6 +1003,7 @@ let PDFViewerApplication = {
|
||||
this.setInitialView(hash, {
|
||||
rotation, sidebarView, scrollMode, spreadMode,
|
||||
});
|
||||
this.eventBus.dispatch('documentinit', { source: this, });
|
||||
|
||||
// Make all navigation keys work on document load,
|
||||
// unless the viewer is embedded in a web page.
|
||||
|
Loading…
x
Reference in New Issue
Block a user