class WebkitRemote::Event::NetworkFailure

Emitted when a resource fails to load.

Attributes

canceled[R]

@return [Boolean] true if the request was canceled

For example, CORS violations cause requests to be canceled.

error[R]

@return [String] the error message

resource[R]

@return [WebkitRemote::Client::NetworkResource] information about the

resource fetched by this network operation
timestamp[R]

@return [Number] the event timestamp

Public Class Methods

new(rpc_event, client) click to toggle source

@private Use Event#for instead of calling this constructor directly.

Calls superclass method WebkitRemote::Event::new
# File lib/webkit_remote/client/network_events.rb, line 56
def initialize(rpc_event, client)
  super
  @canceled = !!raw_data['canceled']
  @error = raw_data['errorText']
  @timestamp = raw_data['timestamp']

  @resource = client.network_resource raw_data['requestId']
  @resource.set_canceled @canceled
  @resource.set_error @error
  @resource.add_event self
end