From e16a220a624cc3f9888ae59feebbd989669a7f31 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 7 May 2015 16:36:57 +0200 Subject: [PATCH] fix iframe unload in firefox --- js/reveal.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index 2c55833..c46ddb6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2986,6 +2986,9 @@ // Lazy loading iframes toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { + // Only removing the src doesn't actually unload the frame + // in all browsers (Firefox) so we set it to blank first + el.setAttribute( 'src', 'about:blank' ); el.removeAttribute( 'src' ); } ); }