Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Easy-Editor/EasyEditor
/ isDocumentNode
Function
isDocumentNode
packages/core/src/utils/is.ts:24–26 ·
view source on GitHub ↗
(node: any)
Source
from the content-addressed store, hash-verified
22
}
23
24
export
const
isDocumentNode = (node: any): node is Document => {
25
return
node.nodeType === Node.DOCUMENT_NODE
26
}
27
28
/**
29
* 判断节点是否在 viewport 内,判断依据:只要节点有一部分在 viewport 内,都算 true,其余情况 false
Callers
1
getWindow
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected