focus-lock

  • Version 0.10.1
  • Published
  • 55.8 kB
  • 1 dependency
  • MIT license

Install

npm i focus-lock
yarn add focus-lock
pnpm add focus-lock

Overview

DOM trap for a focus

Index

Variables

variable tabHook

const tabHook: { attach(): void; detach(): void };

    Functions

    function focusInside

    focusInside: (topNode: HTMLElement | HTMLElement[]) => boolean;

      function focusIsHidden

      focusIsHidden: () => boolean;

        function focusMerge

        focusMerge: (
        topNode: HTMLElement | HTMLElement[],
        lastNode: HTMLInputElement | null
        ) => NodeIndex | { node: HTMLInputElement } | undefined;

          function focusNextElement

          focusNextElement: (baseElement: Element, options?: FocusNextOptions) => void;

            function focusPrevElement

            focusPrevElement: (baseElement: Element, options?: FocusNextOptions) => void;

              function getAllAffectedNodes

              getAllAffectedNodes: (node: HTMLElement | HTMLElement[]) => HTMLInputElement[];

                function getFocusabledIn

                getFocusabledIn: (topNode: HTMLElement) => FocusableIn[];

                  function setFocus

                  setFocus: (
                  topNode: HTMLElement,
                  lastNode: HTMLInputElement,
                  options?: FocusLockFocusOptions
                  ) => void;

                    Namespaces

                    namespace constants

                    module 'dist/es5/constants.d.ts' {}

                      variable FOCUS_ALLOW

                      const FOCUS_ALLOW: string;

                        variable FOCUS_AUTO

                        const FOCUS_AUTO: string;

                          variable FOCUS_DISABLED

                          const FOCUS_DISABLED: string;

                            variable FOCUS_GROUP

                            const FOCUS_GROUP: string;

                              Package Files (10)

                              Dependencies (1)

                              Dev Dependencies (2)

                              Peer Dependencies (0)

                              No peer dependencies.

                              Badge

                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/focus-lock.

                              • Markdown
                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/focus-lock)
                              • HTML
                                <a href="https://www.jsdocs.io/package/focus-lock"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>