Index: visual_studio/NativeClientVSAddIn/TestingProjects/ProjectSettingsTest/ProjectSettingsTest/index.html |
diff --git a/visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/index.html b/visual_studio/NativeClientVSAddIn/TestingProjects/ProjectSettingsTest/ProjectSettingsTest/index.html |
similarity index 65% |
copy from visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/index.html |
copy to visual_studio/NativeClientVSAddIn/TestingProjects/ProjectSettingsTest/ProjectSettingsTest/index.html |
index b78ab81930b89f2e7094d845544a97521cda9044..c976916c28688a63ceafae0e58a3434973c566ef 100644 |
--- a/visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/index.html |
+++ b/visual_studio/NativeClientVSAddIn/TestingProjects/ProjectSettingsTest/ProjectSettingsTest/index.html |
@@ -6,8 +6,8 @@ |
found in the LICENSE file. |
--> |
<head> |
- <meta http-equiv="Pragma" content="no-cache" /> |
- <meta http-equiv="Expires" content="-1" /> |
+ <meta http-equiv="Pragma" content="no-cache"> |
+ <meta http-equiv="Expires" content="-1"> |
<script type="text/javascript"> |
function pageDidLoad() { |
updateStatus('Page loaded.'); |
@@ -15,39 +15,39 @@ |
// Set the global status message |
function updateStatus(opt_message) { |
- naclModule = document.getElementById('dummy_loop'); |
- var statusField = document.getElementById('status_field'); |
+ naclModule = document.getElementById('nacl_module'); |
+ var statusField = document.getElementById('statusField'); |
if (statusField) { |
statusField.innerHTML = opt_message; |
} |
- if (opt_message == "relay1") { |
- naclModule.postMessage("relay2"); |
- } |
- if (opt_message == "relay2") { |
- naclModule.postMessage("relay1"); |
- } |
} |
function handleMessage(message_event) { |
updateStatus(message_event.data); |
+ |
+ if (message_event.data == "relay1") { |
+ naclModule.postMessage("relay2"); |
+ } |
+ if (message_event.data == "relay2") { |
+ naclModule.postMessage("relay1"); |
+ } |
} |
</script> |
</head> |
<body onload="pageDidLoad()"> |
+ <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
<div id="listener"> |
<script type="text/javascript"> |
var listener = document.getElementById('listener'); |
listener.addEventListener('message', handleMessage, true); |
</script> |
- <embed name='nacl_module' |
- id='dummy_loop' |
+ <embed name="nacl_module" |
+ id="nacl_module" |
width=200 |
height=200 |
- src='dummy_loop.nmf' |
- type='application/x-nacl'/> |
+ src="dummy_loop.nmf" |
+ type="application/x-nacl"/> |
</div> |
-<h2>Status</h2> |
-<div id="status_field">NO-STATUS</div> |
</body> |
</html> |