Add supporting themes required for Lotusdocs

This commit is contained in:
Abner Coimbre committed 2026-01-11 16:48:19 -08:00
1 parent 8a4d04db58
commit f8d40c4e41
1289 files changed
+234948

No files matched your search

@@ -0,0 +1,16 @@
import getParentNode from "./getParentNode.js";
import isScrollParent from "./isScrollParent.js";
import getNodeName from "./getNodeName.js";
import { isHTMLElement } from "./instanceOf.js";
export default function getScrollParent(node) {
if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
// $FlowFixMe[incompatible-return]: assume body is always available
return node.ownerDocument.body;
}
if (isHTMLElement(node) && isScrollParent(node)) {
return node;
}
return getScrollParent(getParentNode(node));
}