Vendor reveal.js 5.2.1 (from 5.1.0)
Contains the upstream 5.2.x feature set, most notably the lightbox
(data-preview-image/data-preview-video opens media full-size in an
overlay), controls: "speaker-only", search API extensions and
speaker-view fixes. The package's local additions are carried over
unchanged: IDS theme (ids.css/ids.scss), extra theme fonts,
chalkboard/customcontrols/menu plugins, and the 1280x720 default
slide size (patched in js/config.js and the dist bundles).
Also fixes a pre-existing fork bug (unrelated to the upgrade): the
slidechanged Highcharts resize hook in default.html now checks that
Highcharts exists, no longer throwing in decks without highcharter.
Docs: README (Rmd + rendered md) gained a short Lightbox section,
NEWS.md notes the library bump.
Verified: examples/ids.html and examples/simple.html re-render and run
error-free through all 13/5 slides (Reveal.VERSION = 5.2.1); lightbox
opens on click and closes with Esc in a dedicated test deck.
Change-Id: I0751129dfb0c9d20b56241377905876314a26011
diff --git a/inst/reveal.js-5.2.1/test/test-iframes.html b/inst/reveal.js-5.2.1/test/test-iframes.html
new file mode 100644
index 0000000..805286a
--- /dev/null
+++ b/inst/reveal.js-5.2.1/test/test-iframes.html
@@ -0,0 +1,102 @@
+<!doctype html>
+<html lang="en">
+
+ <head>
+ <meta charset="utf-8">
+
+ <title>reveal.js - Test Iframes</title>
+
+ <link rel="stylesheet" href="../dist/reveal.css">
+ <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
+ <script src="../node_modules/qunit/qunit/qunit.js"></script>
+ </head>
+
+ <body style="overflow: auto;">
+
+ <div id="qunit"></div>
+ <div id="qunit-fixture"></div>
+
+ <div class="reveal" style="display: none;">
+
+ <div class="slides">
+
+ <section>1</section>
+ <section>2</section>
+ <section>
+ <iframe class="default-iframe" data-src="#"></iframe>
+ <iframe class="preload-iframe" data-src="#" data-preload></iframe>
+ </section>
+
+ </div>
+
+ </div>
+
+ <script src="../dist/reveal.js"></script>
+ <script>
+
+ QUnit.config.testTimeout = 30000;
+
+ Reveal.initialize({ viewDistance: 2 });
+
+ var defaultIframe = document.querySelector( '.default-iframe' ),
+ preloadIframe = document.querySelector( '.preload-iframe' );
+
+ QUnit.module( 'Iframe' );
+
+ QUnit.test( 'Using default settings', function( assert ) {
+
+ Reveal.slide(1);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
+
+ Reveal.slide(2);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+
+ Reveal.slide(1);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
+
+ });
+
+ QUnit.test( 'Using data-preload', function( assert ) {
+
+ Reveal.slide(1);
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
+
+ Reveal.slide(2);
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+
+ Reveal.slide(0);
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
+
+ });
+
+ QUnit.test( 'Using preloadIframes: true', function( assert ) {
+
+ Reveal.configure({ preloadIframes: true });
+
+ Reveal.slide(1);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
+
+ Reveal.slide(2);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+
+ });
+
+ QUnit.test( 'Using preloadIframes: false', function( assert ) {
+
+ Reveal.configure({ preloadIframes: false });
+
+ Reveal.slide(0);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
+
+ Reveal.slide(2);
+ assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+ assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
+
+ });
+ </script>
+
+ </body>
+</html>