index.js 710 B

123456789101112131415161718192021
  1. import Presentation from './reveal.js'
  2. // The Reveal class can be instantiated to run multiple
  3. // presentations on the same page
  4. //
  5. // let rvl = new Reveal( <HTMLElement>, { controls: false } )
  6. // rvl.initialize()
  7. // rvl.slide(2)
  8. window.Reveal = Presentation;
  9. // Simplified way to create a reveal.js instance on
  10. // a page with only one presentation, makes us backwards
  11. // compatible with reveal.js pre 4.0
  12. //
  13. // Reveal.initialize({ controls: false })
  14. // Revea.slide(2)
  15. window.Reveal.initialize = options => {
  16. window.Reveal = new Presentation( document.querySelector( '.reveal' ), options );
  17. window.Reveal.initialize();
  18. return new Promise( resolve => window.Reveal.addEventListener( 'ready', resolve ) );
  19. }