From 9a657e26768a3724e6edf9e5fbdd72a4e54da8f4 Mon Sep 17 00:00:00 2001 From: hakimel Date: Fri, 3 Aug 2012 21:49:29 -0400 Subject: ie8 support (closes #96) --- js/reveal.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6da654d..c2f1a57 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 1.5 r8 + * reveal.js 1.5 r9 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -1028,10 +1028,14 @@ var Reveal = (function(){ // Forward event binding to the reveal DOM element addEventListener: function( type, listener, useCapture ) { - ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture ); + if( 'addEventListener' in window ) { + ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture ); + } }, removeEventListener: function( type, listener, useCapture ) { - ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture ); + if( 'addEventListener' in window ) { + ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture ); + } } }; -- cgit v1.2.3