Class: Dommy::FocusEvent
Overview
‘FocusEvent` — focus / blur / focusin / focusout. `relatedTarget` is the element gaining/losing focus on the other side.
Instance Attribute Summary collapse
-
#related_target ⇒ Object
readonly
Returns the value of attribute related_target.
Attributes inherited from Event
Instance Method Summary collapse
- #__js_get__(key) ⇒ Object
-
#initialize(type, init = nil) ⇒ FocusEvent
constructor
A new instance of FocusEvent.
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) ⇒ FocusEvent
Returns a new instance of FocusEvent.
769 770 771 772 |
# File 'lib/dommy/event.rb', line 769 def initialize(type, init = nil) super @related_target = read_init(init, "relatedTarget") end |
Instance Attribute Details
#related_target ⇒ Object (readonly)
Returns the value of attribute related_target.
774 775 776 |
# File 'lib/dommy/event.rb', line 774 def @related_target end |
Instance Method Details
#__js_get__(key) ⇒ Object
776 777 778 779 780 781 782 783 |
# File 'lib/dommy/event.rb', line 776 def __js_get__(key) case key when "relatedTarget" @related_target else super end end |