mirror of
https://git.hmsn.ink/kospo/helptalk/api.git
synced 2026-03-20 22:43:31 +09:00
first
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import getWindowScroll from "./getWindowScroll.js";
|
||||
import getWindow from "./getWindow.js";
|
||||
import { isHTMLElement } from "./instanceOf.js";
|
||||
import getHTMLElementScroll from "./getHTMLElementScroll.js";
|
||||
export default function getNodeScroll(node) {
|
||||
if (node === getWindow(node) || !isHTMLElement(node)) {
|
||||
return getWindowScroll(node);
|
||||
} else {
|
||||
return getHTMLElementScroll(node);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user