1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-08 23:57:13 +02:00

reveal.js can now be instantiated with new Reveal(<htmlelement>,<options>)

This commit is contained in:
Hakim El Hattab
2020-03-07 10:44:02 +01:00
parent 33a1d8d4ad
commit bf45578ba1
5 changed files with 27 additions and 20 deletions

12
js/index.js Normal file
View File

@@ -0,0 +1,12 @@
import _reveal from './reveal.js'
// The Reveal class can be instantiated to run multiple
// presentations on the same page
window.Reveal = _reveal;
// Simplified way to create a reveal.js instance on
// a page with only one presentation, makes us backwards
// compatible with reveal.js pre 4.0
window.Reveal.initialize = options => {
window.Reveal = new _reveal( document.querySelector( '.reveal' ), options );
}