Class: Dommy::CustomEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/dommy/event.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#type

Instance Method Summary collapse

Methods inherited from Event

#__js_call__, #__js_set__, #__prepare_for_dispatch__, #__record_path__, #__set_current_target__, #bubbles?, #default_prevented?, #immediate_propagation_stopped?, #init_event, #propagation_stopped?

Constructor Details

#initialize(type, init = nil) ⇒ CustomEvent

Returns a new instance of CustomEvent.



353
354
355
356
# File 'lib/dommy/event.rb', line 353

def initialize(type, init = nil)
  super
  @detail = read_init(init, "detail")
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



351
352
353
# File 'lib/dommy/event.rb', line 351

def detail
  @detail
end

Instance Method Details

#__js_get__(key) ⇒ Object



358
359
360
361
362
# File 'lib/dommy/event.rb', line 358

def __js_get__(key)
  return @detail if key == "detail"

  super
end