Class: Dommy::CustomEvent

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

Instance Attribute Summary

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.



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

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

Instance Method Details

#__js_get__(key) ⇒ Object



356
357
358
359
360
# File 'lib/dommy/event.rb', line 356

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

  super
end