support including plugins via <script> instead of dependencies

This commit is contained in:
Hakim El Hattab
2020-04-16 15:45:25 +02:00
parent 34458a988a
commit 7b151c2320
10 changed files with 6 additions and 26 deletions

View File

@ -45,7 +45,7 @@ window.Reveal.initialize = options => {
* queuing up early API calls and invoking all of them
* when Reveal.initialize is called.
*/
[ 'on', 'off', 'addEventListener', 'removeEventListener' ].forEach( method => {
[ 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => {
window.Reveal[method] = ( ...args ) => {
enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) );
}

View File

@ -34,7 +34,7 @@ import {
/**
* reveal.js
* http://revealjs.com
* https://revealjs.com
* MIT licensed
*
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se