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

Unified 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: re-enable the full build Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/dlopen/dlopen.html
===================================================================
--- native_client_sdk/src/examples/dlopen/dlopen.html (revision 0)
+++ native_client_sdk/src/examples/dlopen/dlopen.html (revision 0)
@@ -0,0 +1,61 @@
+<html>
Brad Chen 2012/01/28 01:00:52 Please ask an HTML person to review this.
+ <head>
+ <title>dlopen test</title>
+ <script type="text/javascript">
+
+ function moduleDidLoad() {
+ }
+
+ function handleMessage(message_event) {
+ if(message_event.data=='Eightball loaded!')
+ {
+ document.getElementById('consolec').innerHTML = " Eightball loaded, type a question below, press the button, and get a response.<br />" ;
+ document.getElementById('consolec').innerHTML += " <form name='form'><input type='textarea' size='64' name='inputtext' /><INPUT TYPE='button' NAME='button' Value='ASK!' onClick='askBall()'></form>";
+
+ }
+ else if(message_event.data[0]=='!')
+ {
+ document.getElementById('answerlog').innerHTML += (document.form.inputtext.value + ": " + message_event.data +"<br />");
+ }
+ else
+ {
+ document.getElementById('consolec').innerHTML += message_event.data + "<br />";
+ console.log(message_event.data);
+ }
+ }
+
+ function pageDidUnload() {
+ clearInterval(paintInterval);
+ }
+
+ function askBall()
+ {
+ dlopen.postMessage('query');
+
+ }
+ </script>
+ </head>
+ <body id="bodyId" onunload="pageDidUnload()">
+
+ <div id="listener">
+ <script type="text/javascript">
+ var listener = document.getElementById('listener')
+ listener.addEventListener('load', moduleDidLoad, true);
+ listener.addEventListener('message', handleMessage, true);
+ </script>
+ <h1>The Magic 8 Ball </h1>
+ <embed name="nacl_module"
+ id="dlopen"
+ width=1 height=1
+ src="dlopen.nmf"
+ type="application/x-nacl" />
+ </div>
+ <br />
+ <div id="consolec">..loading dynamic librarires...
+ </div>
+
+ <div id="answerlog">
+ </div>
+
+ </body>
+</html>
Property changes on: native_client_sdk/src/examples/dlopen/dlopen.html
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698