Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Nov 8, 2023
1 parent 4507f04 commit 44685d8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ import { focusTrapBehavior } from 'https://unpkg.com/@chialab/loock?module';
import { focusTrapBehavior } from '@chialab/loock';

const dialog = document.getElementById('.dialog');
const trap = focusTrapBehavior(dialog);
const trap = focusTrapBehavior(dialog, {
inert: true,
});

dialog.addEventListener('open', () => {
trap.connect();
Expand All @@ -55,6 +57,12 @@ dialog.addEventListener('open', () => {

### Options

#### `elements`

An array of nodes or a function that returns an array of nodes to use as tabbable elements.

Default: `undefined`.

#### `include`

A list of selectors of tabbable elements to include in the context.
Expand Down

0 comments on commit 44685d8

Please sign in to comment.