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

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

Issue 10758009: Native Client Visual Studio Add-in (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 5 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" />
binji 2012/07/20 00:24:53 <meta> tag does not need to be closed
tysand 2012/08/07 23:01:54 Done.
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('dummy_loop');
19 var statusField = document.getElementById('status_field');
20 if (statusField) {
21 statusField.innerHTML = opt_message;
22 }
23 if (opt_message == "relay1") {
binji 2012/07/20 00:24:53 nit: seems like the message ping-ponging makes mor
tysand 2012/08/07 23:01:54 Done.
24 naclModule.postMessage("relay2");
25 }
26 if (opt_message == "relay2") {
27 naclModule.postMessage("relay1");
28 }
29 }
30
31 function handleMessage(message_event) {
32 updateStatus(message_event.data);
33 }
34
35 </script>
36 </head>
37 <body onload="pageDidLoad()">
38 <div id="listener">
binji 2012/07/20 00:24:53 nit: match the NaCl SDK example layout: <h1>title<
tysand 2012/08/07 23:01:54 Done. I rearranged to match layout but excluded ti
39 <script type="text/javascript">
40 var listener = document.getElementById('listener');
41 listener.addEventListener('message', handleMessage, true);
42 </script>
43 <embed name='nacl_module'
binji 2012/07/20 00:24:53 nit: use double-quotes for element attributes
tysand 2012/08/07 23:01:54 Done.
44 id='dummy_loop'
binji 2012/07/20 00:24:53 nit: use nacl_module for id.
tysand 2012/08/07 23:01:54 Done.
45 width=200
46 height=200
47 src='dummy_loop.nmf'
48 type='application/x-nacl'/>
49 </div>
50 <h2>Status</h2>
51 <div id="status_field">NO-STATUS</div>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698