Add preventScroll check

This commit is contained in:
Cory LaViska
2021-01-08 10:24:39 -05:00
parent 70c7560f60
commit d3e378506e

15
src/utilities/support.ts Normal file
View File

@@ -0,0 +1,15 @@
//
// 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;
}