Class: Browser::Event::Focus

Inherits:
UI show all
Defined in:
opal/browser/event/focus.rb

Defined Under Namespace

Classes: Definition

Instance Attribute Summary

Attributes inherited from Browser::Event

#callback, #on

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Browser::Event

aliases, #arguments, #arguments=, class_for, create, handlers, handles, #initialize, #name, name_for, new, #off, #prevent, #prevented?, #stop, #stop!, #stopped?, #target

Constructor Details

This class inherits a constructor from Browser::Event

Class Method Details

.construct(name, desc) ⇒ Object


21
22
23
# File 'opal/browser/event/focus.rb', line 21

def self.construct(name, desc)
  `new FocusEvent(#{name}, #{desc})`
end

.supported?Boolean

Returns:

  • (Boolean)

6
7
8
# File 'opal/browser/event/focus.rb', line 6

def self.supported?
  Browser.supports? 'Event.Focus'
end

Instance Method Details


36
37
38
# File 'opal/browser/event/focus.rb', line 36

def related
  DOM(`#@native.relatedTarget`)
end