Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the
dispatchDOMEvent
functionality out from the EventBus
and…
… add a deprecation warning for the `eventBusDispatchToDOM` option/preference (PR 11631 follow-up) It occured to me that similar to the `getGlobalEventBus` function, it's probably a good idea to *also* notify users of the fact that `eventBusDispatchToDOM` is now deprecated. Rather than depending of the re-dispatching of internal events to the DOM, the default viewer can instead be used in e.g. the following way: ```javascript document.addEventListener("webviewerloaded", function() { PDFViewerApplication.initializedPromise.then(function() { // The viewer has now been initialized, and its properties can be accessed. PDFViewerApplication.eventBus.on("pagerendered", function(event) { console.log("Has rendered page number: " + event.pageNumber); }); }); }); ```
- Loading branch information