Debugger can now connect. AngularJS: I have no idea what I'm doing.

This commit is contained in:
Ben Vanik 2013-12-21 11:53:49 -08:00
parent da340891c4
commit a9378eb7eb
22 changed files with 1086 additions and 466 deletions

View file

@ -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,
});
*/