Class: WebkitRemote::Event::NetworkLoad
- Inherits:
-
WebkitRemote::Event
- Object
- WebkitRemote::Event
- WebkitRemote::Event::NetworkLoad
- Defined in:
- lib/webkit_remote/client/network_events.rb
Overview
Emitted when a resource finishes loading from the network.
Instance Attribute Summary collapse
-
#resource ⇒ WebkitRemote::Client::NetworkResource
readonly
Information about the resource fetched by this network operation.
-
#timestamp ⇒ Number
readonly
The event timestamp.
Attributes inherited from WebkitRemote::Event
Instance Method Summary collapse
-
#initialize(rpc_event, client) ⇒ NetworkLoad
constructor
A new instance of NetworkLoad.
Methods inherited from WebkitRemote::Event
can_reach?, can_receive?, class_for, for, #matches?, register, register_class
Constructor Details
#initialize(rpc_event, client) ⇒ NetworkLoad
Returns a new instance of NetworkLoad.
81 82 83 84 85 86 87 |
# File 'lib/webkit_remote/client/network_events.rb', line 81 def initialize(rpc_event, client) super @timestamp = raw_data['timestamp'] @resource = client.network_resource raw_data['requestId'] @resource.add_event self end |
Instance Attribute Details
#resource ⇒ WebkitRemote::Client::NetworkResource (readonly)
Returns information about the resource fetched by this network operation.
75 76 77 |
# File 'lib/webkit_remote/client/network_events.rb', line 75 def resource @resource end |
#timestamp ⇒ Number (readonly)
Returns the event timestamp.
78 79 80 |
# File 'lib/webkit_remote/client/network_events.rb', line 78 def @timestamp end |