New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@riot-material/focus-manager

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riot-material/focus-manager

You can install it via nodejs ```sh npm install @riot-material/focus-manager ``` or download one of the bundled file ```js /** * `dist/index.amd.js` * `dist/index.umd.js` */ requirejs.config({ paths: { "@riot-material/focus-manager":

1.2.0
latest
npm
Version published
Weekly downloads
21
Maintainers
1
Weekly downloads
 
Created
Source

focus manager for riot-material

Installation

You can install it via nodejs

npm install @riot-material/focus-manager

or download one of the bundled file

/**
 * `dist/index.amd.js`
 * `dist/index.umd.js`
 */
requirejs.config({
  paths: {
    "@riot-material/focus-manager": "path/to/@riot-material/focus-manager",
  },
});

require(['@riot-material/focus-manager'], function (focusManager) {
    // ...
});

/**
 * `dist/index.js`
 */
import * as focusManager from "@riot-material/focus-manager";

// or

import { ... } from "@riot-material/focus-manager";

otherwise you can include the script in your project html

<script src="@riot-material/focus-manager/index.umd.js" />

and access it via

window.riotMaterial.focusManager;

Methods

hold(options?: IOptions): void

release(): void

on<T extends keyof IManageableEvent`>(type: T, listener: (event: HTMLElementEventMap[T]) => void): void

Interfaces

IOptions

element?: HTMLElement onFocusInside?: (element: Element) => boolean if returns true the focus is kept to the element and hold back when it blurs away onFocusOutside?: (element: Element) => boolean if returns true the focus-manager is released onPrevious?: () => void onNext?: () => void

IManageableEvent

"keydown": KeyboardEvent "keyup": KeyboardEvent

FAQs

Package last updated on 01 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts