presentations

Presentations
Log | Files | Refs

test-dependencies.html (1072B)


      1 <!doctype html>
      2 <html lang="en">
      3 
      4 	<head>
      5 		<meta charset="utf-8">
      6 
      7 		<title>reveal.js - Test Dependencies</title>
      8 
      9 		<link rel="stylesheet" href="../css/reveal.css">
     10 		<link rel="stylesheet" href="qunit-2.5.0.css">
     11 	</head>
     12 
     13 	<body style="overflow: auto;">
     14 
     15 		<div id="qunit"></div>
     16 		<div id="qunit-fixture"></div>
     17 
     18 		<div class="reveal" style="display: none;">
     19 
     20 			<div class="slides">
     21 
     22 				<section>Slide content</section>
     23 
     24 			</div>
     25 
     26 		</div>
     27 
     28 		<script src="../js/reveal.js"></script>
     29 		<script src="qunit-2.5.0.js"></script>
     30 
     31 		<script>
     32 			window.externalScriptSequence = '';
     33 
     34 			Reveal.addEventListener( 'ready', function() {
     35 
     36 				QUnit.module( 'Dependencies' );
     37 
     38 				QUnit.test( 'Load synchronous scripts', function( assert ) {
     39 					assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
     40 				});
     41 
     42 			} );
     43 
     44 			Reveal.initialize({
     45 				dependencies: [
     46 					{ src: 'assets/external-script-a.js' },
     47 					{ src: 'assets/external-script-b.js' },
     48 					{ src: 'assets/external-script-c.js' }
     49 				]
     50 			});
     51 		</script>
     52 
     53 	</body>
     54 </html>