Skip to content

Instantly share code, notes, and snippets.

@cedmandocdoc
cedmandocdoc / Inert.js
Created May 20, 2021 01:11
Inert focus trapping
const Inert = {
enable(element) {
element.inert = false;
},
disable(element) {
element.inert = true;
},
// set the inert of all the siblings of trapped element to true