Files
url_tracker_tool/node_modules/@chakra-ui/utils/dist/cjs/scroll-parent.cjs
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

26 lines
747 B
JavaScript

'use strict';
var isElement = require('./is-element.cjs');
function isScrollParent(el) {
const win = el.ownerDocument.defaultView || window;
const { overflow, overflowX, overflowY } = win.getComputedStyle(el);
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
}
function getParent(el) {
if (el.localName === "html")
return el;
return el.assignedSlot || el.parentElement || el.ownerDocument.documentElement;
}
function getScrollParent(el) {
if (["html", "body", "#document"].includes(el.localName)) {
return el.ownerDocument.body;
}
if (isElement.isHTMLElement(el) && isScrollParent(el)) {
return el;
}
return getScrollParent(getParent(el));
}
exports.getScrollParent = getScrollParent;