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

Side by Side Diff: visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/index.html

Issue 10831030: NaCl settings and completed install scripts. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright (c) 2012 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 <meta http-equiv="Pragma" content="no-cache">
10 <meta http-equiv="Expires" content="-1">
11 <script type="text/javascript">
12 function pageDidLoad() {
13 updateStatus('Page loaded.');
14 }
15
16 // Set the global status message
17 function updateStatus(opt_message) {
18 naclModule = document.getElementById('nacl_module');
19 var statusField = document.getElementById('statusField');
20 if (statusField) {
21 statusField.innerHTML = opt_message;
22 }
23 }
24
25 function handleMessage(message_event) {
26 updateStatus(message_event.data);
27
28 if (message_event.data == "relay1") {
29 naclModule.postMessage("relay2");
30 }
31 if (message_event.data == "relay2") {
32 naclModule.postMessage("relay1");
33 }
34 }
35
36 </script>
37 </head>
38 <body onload="pageDidLoad()">
39 <h2>Status: <code id="statusField">NO-STATUS</code></h2>
40 <div id="listener">
41 <script type="text/javascript">
42 var listener = document.getElementById('listener');
43 listener.addEventListener('message', handleMessage, true);
44 </script>
45 <embed name="nacl_module"
46 id="nacl_module"
47 width=200
48 height=200
49 src="dummy_loop.nmf"
50 type="application/x-nacl"/>
51 </div>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698