diff options
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index fd281cb..f0cb6bd 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -96,6 +96,9 @@ var Reveal = (function(){ dependencies: [] }, + // Flags if reveal.js is loaded (has dispatched the 'ready' event) + loaded = false, + // The current auto-slide duration autoSlide = 0, @@ -447,6 +450,8 @@ var Reveal = (function(){ // Enable transitions now that we're loaded dom.slides.classList.remove( 'no-transition' ); + loaded = true; + dispatchEvent( 'ready', { 'indexh': indexh, 'indexv': indexv, @@ -2670,6 +2675,11 @@ var Reveal = (function(){ } }, + // Checks if reveal.js has been loaded and is ready for use + isReady: function() { + return loaded; + }, + // Forward event binding to the reveal DOM element addEventListener: function( type, listener, useCapture ) { if( 'addEventListener' in window ) { |