UNPKG

@ssgoi/core

Version:

Core animation engine for SSGOI - Native app-like page transitions with spring physics

17 lines (16 loc) 517 B
const n = (e) => { e.style.position = "absolute", e.style.width = "100%", e.style.top = "0", e.style.left = "0"; }, r = (e) => { let t = e.parentElement; for (; t && t !== document.body; ) { const o = window.getComputedStyle(t), l = o.overflow + o.overflowY + o.overflowX; if (l.includes("auto") || l.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth) return t; t = t.parentElement; } return document.documentElement; }; export { r as g, n as p };