Class: Dommy::CustomEvent

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

Constant Summary

Constants inherited from Event

Event::JS_METHOD_NAMES

Instance Attribute Summary collapse

Attributes inherited from Event

#type

Instance Method Summary collapse

Methods inherited from Event

#__internal_prepare_for_dispatch__, #__internal_record_path__, #__internal_set_current_target__, #__js_call__, #__js_method_names__, #__js_set__, #bubbles?, #default_prevented?, #immediate_propagation_stopped?, #init_event, #propagation_stopped?

Constructor Details

#initialize(type, init = nil) ⇒ CustomEvent

Returns a new instance of CustomEvent.



371
372
373
374
# File 'lib/dommy/event.rb', line 371

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

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



369
370
371
# File 'lib/dommy/event.rb', line 369

def detail
  @detail
end

Instance Method Details

#__js_get__(key) ⇒ Object



376
377
378
379
380
# File 'lib/dommy/event.rb', line 376

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

  super
end