Sha256: 77f1e83625e2fcb4cd8cb2d53a147a5a1c7a2515ad860e8b20b2a27c60bc1336

Contents?: true

Size: 713 Bytes

Versions: 7

Compression:

Stored size: 713 Bytes

Contents

(function() {
  JsTestServer.RemoteControl = function() {
  };

  JsTestServer.RemoteControl.start = function() {
    var instance = new JsTestServer.RemoteControl();
    instance.start();
  };

  JsTestServer.RemoteControl.prototype.start = function() {
    this.poll();
  };

  JsTestServer.RemoteControl.prototype.poll = function() {
    var self = this;
    JsTestServer.xhrGet("/remote_control/commands", function(request) {
      if(request.status == 200) {
        var messages = eval(request.responseText);
        for(var i=0; i < messages.length; i++) {
          eval(messages[i].javascript);
        }
        setTimeout(function() {
          self.poll();
        }, 100);
      };
    });
  };
})();

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.12 public/js_test_server/remote_control.js
honkster-js-test-server-0.2.11 public/js_test_server/remote_control.js
honkster-js-test-server-0.2.10 public/js_test_server/remote_control.js
honkster-js-test-server-0.2.9 public/js_test_server/remote_control.js
js-test-server-0.2.8 public/js_test_server/remote_control.js
js-test-server-0.2.7 public/js_test_server/remote_control.js
js-test-server-0.2.6 public/js_test_server/remote_control.js