1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-09-02 11:12:47 +02:00

Add bundler-friendly dependency injection

This commit is contained in:
quilicicf
2019-11-08 13:31:28 +01:00
parent 3f95a21009
commit d378ab2e63
3 changed files with 31 additions and 13 deletions

View File

@@ -522,6 +522,13 @@ You can add your own extensions using the same syntax. The following properties
- **callback**: [optional] Function to execute when the script has loaded
- **condition**: [optional] Function which must return true for the script to be loaded
You can additionally use the following syntax, in case you are using a bundler:
- **id**: the id of the plugin to load
- **plugin**: the plugin object to load. It is the plugin implementation that can contain an `init` function
- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false
- **callback**: [optional] Function to execute when the script has loaded
- **condition**: [optional] Function which must return true for the script to be loaded
### Ready Event
A `ready` event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`.