Class: WebkitRemote::Event::PageDomReady

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

Overview

Emitted when a page’s DOMcontent 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) ⇒ PageDomReady

Returns a new instance of PageDomReady.



32
33
34
35
# File 'lib/webkit_remote/client/page_events.rb', line 32

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



29
30
31
# File 'lib/webkit_remote/client/page_events.rb', line 29

def timestamp
  @timestamp
end

Class Method Details

.can_reach?(client) ⇒ Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/webkit_remote/client/page_events.rb', line 38

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