664b79abe0
This functionality was only added to the default viewer for backwards compatibility and to support the various PDF viewer tests in mozilla-central, with the intention to eventually remove it completely. While the different mozilla-central tests cannot be *easily* converted from DOM events, it's however possible to limit that functionality to only MOZCENTRAL builds *and* when tests are running. 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); }); }); }); ``` |
||
---|---|---|
.. | ||
options | ||
pageAction | ||
.eslintrc | ||
.gitignore | ||
contentscript.js | ||
contentstyle.css | ||
extension-router.js | ||
icon16.png | ||
icon19.png | ||
icon38.png | ||
icon48.png | ||
icon128.png | ||
manifest.json | ||
pdfHandler-vcros.js | ||
pdfHandler.html | ||
pdfHandler.js | ||
preferences_schema.json | ||
preserve-referer.js | ||
restoretab.html | ||
restoretab.js | ||
suppress-update.js | ||
telemetry.js |