Updated Third party viewer usage (markdown)
parent
fec123b0e9
commit
ba39566079
@ -9,4 +9,7 @@ document.addEventListener("webviewerloaded", function() {
|
||||
// The viewer has now been initialized.
|
||||
})
|
||||
});
|
||||
```
|
||||
```
|
||||
|
||||
### Event bus
|
||||
The viewer components can dispatch events on an event bus to which other components can listen and act upon. PDF.js dispatches common events on the event bus that the user provides. For custom deployments it is required to provide a manually made event bus instance since pull request [#11631](https://github.com/mozilla/pdf.js/pull/11631). This prevents having to use DOM events for this purpose, making the viewer more stand-alone. Event bus instances have an `on` method to start listening for an event, an `off` method to stop listening for an event and a `dispatch` method to send an event through the event bus for other viewer components.
|
||||
Loading…
x
Reference in New Issue
Block a user