3 <TITLE>Life Demo
</TITLE>
5 <script type=
"text/javascript">
9 // Before scripting the loaded module, ensure the Native Client module is loaded.
12 var PostLoadInit = function() {
13 if (nacl_elt
.__moduleReady
== 1) {
14 clearTimeout(startupTimeout
);
17 if (nacl_elt
.__moduleReady
== undefined) {
18 alert('The Native Client plugin was unable to load');
21 startupTimeout
= setTimeout(PostLoadInit
, 100);
25 // Init is called when the document has completed loading. It downloads the
26 // NativeClient modules.
27 var Init = function() {
28 // service_url contains the location of the NativeClient module to be
29 // loaded as a service.
30 nacl_elt
= document
.getElementById('embed1');
38 <BODY id=
"bodyId" onload=
"Init();" >
40 <h1>Conway's Life
</h1>
42 Use the mouse to paint extra life into the simulation.
44 <embed id=
"embed1" src=
"life.nexe" type=
"application/x-nacl-srpc" width=
512 height=
512>
48 var embed1
= document
.getElementById('embed1');