aboutsummaryrefslogtreecommitdiff
path: root/static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-11-26 15:51:03 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-11-26 15:51:03 +0100
commit2b53e3e2ef985a01fecede6a5854428391d83726 (patch)
tree1ca7dcc4edbabb55068a315e57c24b58b00fa920 /static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html
parent888003d72fe33b0a8e8962040d1f759b58f18e6b (diff)
downloadrfid-2b53e3e2ef985a01fecede6a5854428391d83726.tar.gz
rfid-2b53e3e2ef985a01fecede6a5854428391d83726.zip
Ajout présentation et programme du 11/12
Diffstat (limited to 'static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html')
-rw-r--r--static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html b/static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html
new file mode 100644
index 0000000..5f2a49b
--- /dev/null
+++ b/static/presentations/2021-11-13/garage/test/test-multiple-instances-es5.html
@@ -0,0 +1,85 @@
+<!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="deck1">
+ <div class="reveal" style="display: none;">
+ <div class="slides">
+ <section>1.1</section>
+ <section>1.2</section>
+ <section>1.3</section>
+ </div>
+ </div>
+ </div>
+
+ <div class="deck2">
+ <div class="reveal" style="display: none;">
+ <div class="slides">
+ <section>2.1</section>
+ <section>2.2</section>
+ <section>2.3</section>
+ </div>
+ </div>
+ </div>
+
+ <script src="../dist/reveal.js"></script>
+ <script src="../plugin/zoom/zoom.js"></script>
+ <script>
+
+ QUnit.module( 'Multiple reveal.js instances' );
+
+ let r1 = new Reveal( document.querySelector( '.deck1 .reveal' ), {
+ embedded: true,
+ keyboard: true,
+ plugins: [RevealZoom()]
+ } );
+ r1.initialize();
+
+ let r2 = new Reveal( document.querySelector( '.deck2 .reveal' ), {
+ embedded: true,
+ keyboard: false
+ } );
+ r2.initialize();
+
+ QUnit.test( 'Can make independent changes', function( assert ) {
+
+ r1.slide(1);
+ r2.slide(2);
+ assert.strictEqual( r1.getCurrentSlide().textContent, '1.2' );
+ assert.strictEqual( r2.getCurrentSlide().textContent, '2.3' );
+
+ r2.toggleOverview( true );
+ assert.strictEqual( r1.isOverview(), false );
+ assert.strictEqual( r2.isOverview(), true );
+ r2.toggleOverview( false );
+
+ assert.strictEqual( r1.getConfig().keyboard, true );
+ assert.strictEqual( r2.getConfig().keyboard, false );
+
+ });
+
+ QUnit.test( 'Can register plugins independently', function( assert ) {
+
+ assert.ok( r1.hasPlugin( 'zoom' ) );
+ assert.notOk( r2.hasPlugin( 'zoom' ) );
+
+ });
+
+ </script>
+
+ </body>
+</html>