mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-04 14:17:24 +00:00
Debugger can now connect. AngularJS: I have no idea what I'm doing.
This commit is contained in:
parent
da340891c4
commit
a9378eb7eb
22 changed files with 1086 additions and 466 deletions
|
|
@ -7,41 +7,7 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
// TODO(benvanik): closure or something fancy
|
||||
|
||||
|
||||
var DebugClient = function(endpoint) {
|
||||
/**
|
||||
* Target websocket endpoint.
|
||||
* @type {string}
|
||||
* @private
|
||||
*/
|
||||
this.endpoint_ = endpoint;
|
||||
|
||||
/**
|
||||
* Connected socket.
|
||||
* @type {!WebSocket}
|
||||
* @private
|
||||
*/
|
||||
this.socket_ = new WebSocket(endpoint, []);
|
||||
|
||||
this.socket_.onopen = (function() {
|
||||
console.log('opened');
|
||||
}).bind(this);
|
||||
|
||||
this.socket_.onerror = (function(e) {
|
||||
console.log('error', e);
|
||||
}).bind(this);
|
||||
|
||||
this.socket_.onmessage = (function(e) {
|
||||
console.log('message', e.data);
|
||||
}).bind(this);
|
||||
}
|
||||
|
||||
|
||||
var client = new DebugClient('ws://127.0.0.1:6200');
|
||||
|
||||
|
||||
/*
|
||||
var myTextArea = document.querySelector('.debugger-fnview-textarea');
|
||||
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
|
||||
mode: 'javascript',
|
||||
|
|
@ -58,3 +24,4 @@ var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
|
|||
|
||||
//readOnly: true,
|
||||
});
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue