71 lines
1.5 KiB
HTML
71 lines
1.5 KiB
HTML
<!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="qunit-2.5.0.css">
|
|
<script src="qunit-2.5.0.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.min.js"></script>
|
|
<script>
|
|
|
|
QUnit.module( 'Multiple reveal.js instances' );
|
|
|
|
let r1 = new Reveal( document.querySelector( '.deck1 .reveal' ), {
|
|
embedded: true
|
|
} );
|
|
r1.initialize();
|
|
|
|
let r2 = new Reveal( document.querySelector( '.deck2 .reveal' ), {
|
|
embedded: true
|
|
} );
|
|
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 );
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|