Class: Dommy::FocusEvent
Overview
FocusEvent — focus / blur / focusin / focusout. relatedTarget
is the element gaining/losing focus on the other side.
Constant Summary
Constants inherited from Event
Event::AT_TARGET, Event::BUBBLING_PHASE, Event::CAPTURING_PHASE, Event::NONE
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 UIEvent
Methods inherited from Event
#__internal_clear_propagation_flags__, #__internal_mark_trusted__, #__internal_prepare_for_dispatch__, #__internal_record_path__, #__internal_run_passive__, #__internal_set_current_target__, #__internal_set_dispatch_flag__, #__internal_set_event_phase__, #__js_call__, #__js_set__, #bubbles?, #default_prevented?, #immediate_propagation_stopped?, #init_event, #propagation_stopped?
Methods included from Bridge::Methods
Constructor Details
#initialize(type, init = nil) ⇒ FocusEvent
Returns a new instance of FocusEvent.
1350 1351 1352 1353 |
# File 'lib/dommy/event.rb', line 1350 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.
1355 1356 1357 |
# File 'lib/dommy/event.rb', line 1355 def @related_target end |
Instance Method Details
#__js_get__(key) ⇒ Object
1357 1358 1359 1360 1361 1362 1363 1364 |
# File 'lib/dommy/event.rb', line 1357 def __js_get__(key) case key when "relatedTarget" @related_target else super end end |