Fix plugin documentation

Mention that reveal.js will wait for the Promise of a plugin's init()
function only when the plugin is loaded non-async. The init functions
of plugins that are loaded as async dependencies are called after
reveal.js has dispatched the 'ready' event.
edit
Mario Botsch 2019-04-23 23:28:05 +02:00
parent a16b71a981
commit 1f5fb971d4
1 changed files with 1 additions and 0 deletions

View File

@ -1268,6 +1268,7 @@ Reveal.addEventListener( 'ready', () => console.log( 'Three seconds later...' )
Reveal.initialize(); Reveal.initialize();
``` ```
For plugins that are loaded as [dependencies](#dependencies), reveal.js will wait for the fullfillment of their init Promise only for the *non-async* plugins.
If the init method does _not_ return a Promise, the plugin is considered ready right away and will not hold up the reveal.js startup sequence. If the init method does _not_ return a Promise, the plugin is considered ready right away and will not hold up the reveal.js startup sequence.
### Retrieving Plugins ### Retrieving Plugins