mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
11 lines
460 B
JavaScript
11 lines
460 B
JavaScript
import { containsComposed, getDeepActiveElement, isDocument } from "@videojs/utils/dom";
|
|
//#region src/dom/ui/slider-focus.ts
|
|
function isSliderFocused(root = document) {
|
|
const active = getDeepActiveElement(isDocument(root) ? root : root.ownerDocument);
|
|
if (active?.getAttribute("role") !== "slider") return false;
|
|
return isDocument(root) || containsComposed(root, active);
|
|
}
|
|
//#endregion
|
|
export { isSliderFocused };
|
|
|
|
//# sourceMappingURL=slider-focus.js.map
|