diff --git a/src/internal/focus-lock-utils/utils.ts b/src/internal/focus-lock-utils/utils.ts index d4c11eb..1debbda 100644 --- a/src/internal/focus-lock-utils/utils.ts +++ b/src/internal/focus-lock-utils/utils.ts @@ -30,7 +30,7 @@ export function isFocusable(element: HTMLElement): boolean { } export function getAllFocusables(container: HTMLElement): HTMLElement[] { - return Array.prototype.slice.call(container.querySelectorAll(tabbables)); + return [...container.querySelectorAll(tabbables)] as HTMLElement[]; } function getFocusables(container: HTMLElement): HTMLElement[] { diff --git a/tsconfig.json b/tsconfig.json index d536895..75b5f01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "lib": ["es2020", "dom"], - "target": "es2015", + "lib": ["es2021", "dom"], + "target": "es2021", "module": "esnext", "moduleResolution": "node", "esModuleInterop": true,