Namespace for utility methods
- Source:
Methods
-
<static> addListeners(elem)
-
Adds the Tab Override event listeners to the specified element. Hooks: addListeners - passed the element to which the listeners will be added.
Parameters:
Name Type Description elemElement the element to which the listeners will be added - Source:
-
<static> createListeners(handlerList) → {tabOverride.utils~listenersObj}
-
Creates functions to add and remove event listeners in a cross-browser compatible way.
Parameters:
Name Type Description handlerListtabOverride.utils~handlerObj[] an array of handlerObj objects - Source:
Returns:
a listenersObj object used to add and remove the event listeners -
<static> executeExtensions(hook, args)
-
Executes all registered extension functions for the specified hook.
Parameters:
Name Type Argument Description hookstring the name of the hook for which the extensions are registered argsArray <optional>
the arguments to pass to the extension - Source:
-
<static> isValidModifierKeyCombo(modifierKeys, e) → {boolean}
-
Determines whether the specified modifier keys match the modifier keys that were pressed.
Parameters:
Name Type Description modifierKeysstring[] the modifier keys to check - ex: ['shiftKey'] eEvent the event object for the keydown event - Source:
Returns:
whether modifierKeys are valid for the event- Type
- boolean
-
<static> removeListeners(elem)
-
Removes the Tab Override event listeners from the specified element. Hooks: removeListeners - passed the element from which the listeners will be removed.
Parameters:
Name Type Description elemElement the element from which the listeners will be removed - Source:
Type Definitions
-
handlerObj
-
Type:
- Object
- Source:
Properties:
Name Type Description typestring the event type handlerfunction the handler function - passed an Event object -
listenersObj
-
Type:
- Object
- Source:
Properties:
Name Type Description addfunction Adds all the event listeners to the specified element removefunction Removes all the event listeners from the specified element