MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / findDOMNodes

Method findDOMNodes

packages/core/src/simulator/simulator.ts:542–556  ·  view source on GitHub ↗
(instance: ComponentInstance, selector?: string)

Source from the content-addressed store, hash-verified

540 }
541
542 findDOMNodes(instance: ComponentInstance, selector?: string): Array<Element | Text> | null {
543 const elements = this._renderer?.findDOMNodes(instance)
544 if (!elements) {
545 return null
546 }
547
548 if (selector) {
549 const matched = getMatched(elements, selector)
550 if (!matched) {
551 return null
552 }
553 return [matched]
554 }
555 return elements
556 }
557
558 getNodeInstanceFromElement(target: Element | null): NodeInstance<ComponentInstance, Node> | null {
559 if (!target) {

Callers 1

scrollToNodeMethod · 0.95

Calls 2

getMatchedFunction · 0.85
findDOMNodesMethod · 0.65

Tested by

no test coverage detected