mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
16 lines
285 B
TypeScript
16 lines
285 B
TypeScript
//
|
|
// Determines if the browser supports focus({ preventScroll })
|
|
//
|
|
export function isPreventScrollSupported() {
|
|
let supported = false;
|
|
|
|
document.createElement('div').focus({
|
|
get preventScroll() {
|
|
supported = true;
|
|
return false;
|
|
}
|
|
});
|
|
|
|
return supported;
|
|
}
|