MCPcopy Create free account
hub / github.com/editablejs/editable / isDOMNode

Function isDOMNode

packages/models/src/utils/dom.ts:55–58  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

53 */
54
55export const isDOMNode = (value: any): value is DOMNode => {
56 const window = getDefaultView(value) ?? globalThis.window
57 return !!window && value instanceof window.Node
58}
59
60/**
61 * Check if a value is a DOM selection.

Callers 6

findClosestPointFunction · 0.90
ContentEditableFunction · 0.90
TableComponentFunction · 0.90
isDOMCommentFunction · 0.85
isDOMElementFunction · 0.85
isDOMTextFunction · 0.85

Calls 1

getDefaultViewFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…