inert property
bool
get
inert
The HTMLElement property inert
reflects the value of the element's
inert
attribute. It is a boolean value that, when present, makes the browser
"ignore" user input events for the element, including focus events and
events from assistive technologies. The browser may also ignore page
search and text selection in the element. This can be useful when building
UIs such as modals where you would want to "trap" the focus inside the
modal when it's visible.
Note: Do not nest interactive elements or important content within elements with the
inert
attribute as inert content and their descendants are neither focusable nor perceivable by all users.
Implementation
external bool get inert;
set
inert
(bool value)
Implementation
external set inert(bool value);