Constructor
new FocusManager(options)
Handle the focus
Parameters:
Name | Type | Description |
---|---|---|
options | Object | |
- Since
- 1.25.0
- Copyright
- schukai GmbH
- License
- AGPLv3
Throws:
unsupported locale
- Type
- Error
Members
defaults
PropertiesName | Type | Description |
---|---|---|
document | HTMLDocument | the document object into which the node is to be appended |
(static) instanceSymbol
This method is called by the
instanceof
operator.This method is called by the instanceof
operator.
- Since
- 2.1.0
Methods
focus(element, preventScroll) → {Monster.DOM.FocusManager}
Parameters:
Name | Type | Description |
---|---|---|
element | Node | |
preventScroll | boolean |
Throws:
value is not an instance of
- Type
- TypeError
Returns:
- Type:
- Monster.
DOM. FocusManager
focusNext(query) → {Monster.DOM.FocusManager}
Parameters:
Name | Type | Description |
---|---|---|
query | string |
Returns:
- Type:
- Monster.
DOM. FocusManager
focusPrev(query) → {Monster.DOM.FocusManager}
Parameters:
Name | Type | Description |
---|---|---|
query | string |
Returns:
- Type:
- Monster.
DOM. FocusManager
getActive() → {Element}
Returns:
- Type:
- Element
getFocusable(query) → {array}
Select all elements that can be focused
.Select all elements that can be focused
Parameters:
Name | Type | Description |
---|---|---|
query | string | |
Throws:
value is not an instance of
- Type
- TypeError
Returns:
- Type:
- array
restoreFocus() → {Monster.DOM.FocusManager}
The last focus on the stack is set again
.The last focus on the stack is set again
Returns:
- Type:
- Monster.
DOM. FocusManager
storeFocus() → {Monster.DOM.FocusManager}
Remembers the current focus on a stack.
Remembers the current focus on a stack. Several focus can be stored.
Returns:
- Type:
- Monster.
DOM. FocusManager