You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/js/utils.js
+24-25Lines changed: 24 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,12 @@ const Events = {
21
21
constMessages={
22
22
NO_SELECTOR_STRING_OR_CHILDREN_ERROR:
23
23
"createFocusTrap must be given one or both of: first parameter (as selector string) and/or options.children (array of elements).",
24
-
OPTION_USE_ARROWS_DATA_TYPE_ERROR:
25
-
"Invalid data type given to options.useArrows for createFocusTrap. Expected: Boolean.",
26
24
OPTION_MATCHERS_DATA_TYPE_ERROR:
27
25
"Invalid data type given to options.matchers for createFocusTrap. Expected: Array.",
28
-
OPTION_CHILDREN_DATA_TYPE_ERROR:
29
-
"Invalid data type given to options.children for createFocusTrap. Expected: Array-Like.",
26
+
INCORRECT_MATCHER_TYPE_ERROR: type=>
27
+
`Invalid matcher given to options.matchers for createFocusTrap. Expected: String. Recieved: ${type}.`,
28
+
NO_MATCHER_LENGTH_ERROR:
29
+
"Invalid value given to options.matchers for createFocusTrap; value must be an array with at least one selector string",
30
30
NO_PARENT_FOUND_IN_SCOPE: id=>`Element couldn't be found with selector string: '${id}'`,
31
31
DUPLICATE_SCOPE_ERROR: id=>
32
32
`You tried to start an Undernet component with scope '${id}', but that scope is already active.\n\nYou must call COMPONENT_NAME.stop(scopeSelector) first, then.`,
@@ -102,8 +102,8 @@ export const dom = {
102
102
* ```
103
103
*
104
104
* @param {String} selectorString - The selector string of the container element.
105
-
* @param {Array<String>} matchers - Optional matchers override. Defaults to common focusable selectors.
106
-
* @returns {Array<Element>} Static array of HTML elements
105
+
* @param {String[]} matchers - Optional matchers override. Defaults to common focusable selectors.
106
+
* @returns {Element[]} Static array of HTML elements
0 commit comments