Sha256: ceaf52f835ea54a50312cd878e6827bdd5516f66f884f780661634a3f1e64932

Contents?: true

Size: 770 Bytes

Versions: 13

Compression:

Stored size: 770 Bytes

Contents

Poltergeist.Cmd = (function() {
  function Cmd(owner, id, name, args) {
    this.owner = owner;
    this.id = id;
    this.name = name;
    this.args = args;
  }

  Cmd.prototype.sendResponse = function(response) {
    var errors;
    errors = this.browser.currentPage.errors;
    this.browser.currentPage.clearErrors();
    if (errors.length > 0 && this.browser.js_errors) {
      return this.sendError(new Poltergeist.JavascriptError(errors));
    } else {
      return this.owner.sendResponse(this.id, response);
    }
  };

  Cmd.prototype.sendError = function(errors) {
    return this.owner.sendError(this.id, errors);
  };

  Cmd.prototype.run = function(browser) {
    this.browser = browser;
    return this.browser.runCommand(this);
  };

  return Cmd;

})();

Version data entries

13 entries across 9 versions & 3 rubygems

Version Path
poltergeistFork-0.0.4 lib/capybara/poltergeist/client/pre/cmd.js
poltergeistFork-0.0.4 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeistFork-0.0.3 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeistFork-0.0.3 lib/capybara/poltergeist/client/pre/cmd.js
poltergeist-1.10.0 lib/capybara/poltergeist/client/compiled/cmd.js
undead-0.2.0 lib/undead/client/compiled/cmd.js
poltergeist-1.9.0 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeistFork-0.0.2 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeistFork-0.0.2 lib/capybara/poltergeist/client/pre/cmd.js
poltergeistFork-0.0.1 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeistFork-0.0.1 lib/capybara/poltergeist/client/pre/cmd.js
poltergeist-1.8.1 lib/capybara/poltergeist/client/compiled/cmd.js
poltergeist-1.8.0 lib/capybara/poltergeist/client/compiled/cmd.js