Class: WebkitRemote::Event::PageLoaded

Inherits:
WebkitRemote::Event show all
Defined in:
lib/webkit_remote/client/page_events.rb

Overview

Emitted when a page’s load event is triggerred.

Instance Attribute Summary collapse

Attributes inherited from WebkitRemote::Event

#domain, #name, #raw_data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from WebkitRemote::Event

can_receive?, class_for, for, #matches?, register, register_class

Constructor Details

#initialize(rpc_event, client) ⇒ PageLoaded

Returns a new instance of PageLoaded.



13
14
15
16
# File 'lib/webkit_remote/client/page_events.rb', line 13

def initialize(rpc_event, client)
  super
  @timestamp = raw_data['timestamp']
end

Instance Attribute Details

#timestampNumber (readonly)

Returns the event timestamp.

Returns:

  • (Number)

    the event timestamp



10
11
12
# File 'lib/webkit_remote/client/page_events.rb', line 10

def timestamp
  @timestamp
end

Class Method Details

.can_reach?(client) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/webkit_remote/client/page_events.rb', line 19

def self.can_reach?(client)
  client.page_events
end