Monster.DOM. FocusManager

With the focusmanager the focus can be stored in a document, recalled and moved.

Constructor

new FocusManager(options)

Handle the focus

Parameters:
NameTypeDescription
optionsObject | undefined
Since
  • 1.25.0
License
  • AGPLv3
Throws:

unsupported locale

Type
Error

Members

defaults

Properties
NameTypeDescription
documentHTMLDocument

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:
NameTypeDescription
elementNode
preventScrollboolean
Throws:

value is not an instance of

Type
TypeError

focusNext(query) → {Monster.DOM.FocusManager}

Parameters:
NameTypeDescription
querystring

focusPrev(query) → {Monster.DOM.FocusManager}

Parameters:
NameTypeDescription
querystring

getActive() → {Element}

Returns:
Type: 
Element

getFocusable(query) → {array}

Select all elements that can be focused

.

Select all elements that can be focused

Parameters:
NameTypeDescription
querystring | undefined
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

storeFocus() → {Monster.DOM.FocusManager}

Remembers the current focus on a stack.

Remembers the current focus on a stack. Several focus can be stored.