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

Side by Side Diff: visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html

Issue 11150028: Add new VS AddIn examples (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 2 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/10/15 22:15:46 same fixes from C version?
10 <meta http-equiv="Expires" content="-1">
11 <script type="text/javascript">
12 function pageDidLoad() {
13 appendStatus('Page loaded');
14 }
15
16 var forceRedraw = function (element) {
17
18 if (!element) { return; }
19
20 var n = document.createTextNode(' ');
21 var disp = element.style.display; // don't worry about previous displ ay style
22
23 element.appendChild(n);
24 element.style.display = 'none';
25
26 setTimeout(function () {
27 element.style.display = disp;
28 n.parentNode.removeChild(n);
29 }, 50);
30 }
31
32 function appendStatus(opt_message) {
33 var statusField = document.getElementById('statusField');
34 if (statusField) {
35 var newElt = document.createElement("opt_message");
36 newElt.innerHTML = "<br>" + opt_message;
37 statusField.appendChild(newElt);
38 forceRedraw(newElt);
39 }
40 }
41
42
43 function handleMessage(message_event) {
44 appendStatus(message_event.data);
45 }
46
47 </script>
48 </head>
49 <body onload="pageDidLoad()">
50 <div id="listener">
51 <script type="text/javascript">
52 var listener = document.getElementById('listener');
53 listener.addEventListener('message', handleMessage, true);
54 </script>
55 <h2>NaCl Module</h2>
56 <embed name="nacl_module"
57 id="nacl_module"
58 style="border-style: solid;"
59 width=200
60 height=200
61 src="hello_nacl_cpp.nmf"
62 type="application/x-nacl"/>
63 </div>
64 <div>
65 <h2>Messages: <code id="statusField"></code></h2>
66 </div>
67 </body>
68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698