Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: native_client_sdk/src/examples/dlopen/dlopen.html

Issue 9234043: Support GLBIC example. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright (c) 2011 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head>
9 <title>Magic Eightball</title>
10 <script type="text/javascript">
11
12 function moduleDidLoad() {
13 }
14
15 function handleMessage(message_event) {
16 if(message_event.data=='Eightball loaded!')
17 {
18 document.getElementById('consolec').innerHTML =
19 " Eightball loaded, type a question below, press the button, and get a response.<br />";
20 document.getElementById('consolec').innerHTML += "<form name='form' Valu e='Hello Me' onsubmit='askBall()'>";
21 document.getElementById('consolec').innerHTML += " <input type='textare a' size='64' name='inputtext' />";
22 document.getElementById('consolec').innerHTML += " <input type='button' NAME='button' Value='ASK!' onClick='askBall()' />";
23 document.getElementById('consolec').innerHTML += "</form>";
24 }
25 else
26 {
27 if(message_event.data[0]=='!')
28 {
29 document.getElementById('answerlog').innerHTML +=
30 (document.form.inputtext.value + ": " + message_event.data +"<br />" );
31 }
32 else
33 {
34 document.getElementById('consolec').innerHTML += message_event.data + "<br />";
35 console.log(message_event.data);
36 }
37 }
38 }
39
40 function pageDidUnload() {
41 clearInterval(paintInterval);
42 }
43
44 function askBall()
45 {
46 dlopen.postMessage('query');
47 return false;
48 }
49 </script>
50 </head>
51 <body id="bodyId" onunload="pageDidUnload()">
52 <div id="listener">
53 <script type="text/javascript">
54 var listener = document.getElementById('listener')
55 listener.addEventListener('load', moduleDidLoad, true);
56 listener.addEventListener('message', handleMessage, true);
57 </script>
58 <h1>The Magic 8 Ball </h1>
59 <embed name="nacl_module"
60 id="dlopen"
61 width=1 height=1
62 src="dlopen.nmf"
63 type="application/x-nacl" />
64 </div>
65 <br />
66 <div id="consolec">..loading dynamic librarires...</div>
67 <div id="answerlog"></div>
68 </body>
69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698