incorporate the debugger
This commit is contained in:
parent
05fd6df8fe
commit
0847bc73c5
29 changed files with 944 additions and 19 deletions
43
experiments/socket.html
Normal file
43
experiments/socket.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="src/d8.js"></script>
|
||||
<script type="text/javascript" src="src/o3.js"></script>
|
||||
<script type="text/javascript" src="src/O3Socket.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<embed type="application/o3stem-aaaaaaaa-1111-bbbb-1111-cccccccccccc" width="0" height="0" />
|
||||
|
||||
<button onClick="testChrome()">start test</button>
|
||||
<br>
|
||||
<textarea name="log" id="log" cols="100" rows="25">
|
||||
</textarea>
|
||||
</body>
|
||||
<script>
|
||||
|
||||
(function() {
|
||||
|
||||
var o3obj = document.getElementsByTagName("embed")[0];
|
||||
var socket = new O3Socket("127.0.0.1", 9222, o3obj);
|
||||
|
||||
socket.onconnect = function() {
|
||||
log("connect");
|
||||
}
|
||||
|
||||
socket.onreceive = function() {
|
||||
log("receive");
|
||||
}
|
||||
|
||||
socket.connect();
|
||||
|
||||
function log(text) {
|
||||
var prev;
|
||||
if (document.all) {
|
||||
document.getElementById('log').innerText += text;
|
||||
} else {
|
||||
document.getElementById('log').textContent += text;
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
</script>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue