Sha256: c2e112befed3efa5fd4e9887745222985fd561b5ffa6fc235e47fce70b983c0d

Contents?: true

Size: 446 Bytes

Versions: 8

Compression:

Stored size: 446 Bytes

Contents

class Poltergeist.Cmd
  constructor: (@owner, @id, @name, @args)->

  sendResponse: (response) ->
    errors = @browser.currentPage.errors
    @browser.currentPage.clearErrors()

    if errors.length > 0 && @browser.js_errors
      @sendError(new Poltergeist.JavascriptError(errors))
    else
      @owner.sendResponse(@id, response)

  sendError: (errors) ->
    @owner.sendError(@id, errors)

  run: (@browser) ->
    @browser.runCommand(this)

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
poltergeistFork-0.0.4 lib/capybara/poltergeist/client/cmd.coffee
poltergeistFork-0.0.3 lib/capybara/poltergeist/client/cmd.coffee
poltergeist-1.10.0 lib/capybara/poltergeist/client/cmd.coffee
poltergeist-1.9.0 lib/capybara/poltergeist/client/cmd.coffee
poltergeistFork-0.0.2 lib/capybara/poltergeist/client/cmd.coffee
poltergeistFork-0.0.1 lib/capybara/poltergeist/client/cmd.coffee
poltergeist-1.8.1 lib/capybara/poltergeist/client/cmd.coffee
poltergeist-1.8.0 lib/capybara/poltergeist/client/cmd.coffee