MCPcopy
hub / github.com/basecamp/trix / getElementWithText

Function getElementWithText

src/test/system/html_replacement_test.js:118–125  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

116}
117
118const getElementWithText = function (text) {
119 for (const element of Array.from(document.activeElement.querySelectorAll("*"))) {
120 if (element.innerText === text) {
121 return element
122 }
123 }
124 return null
125}

Callers 1

pressCommandBackspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…