MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / oninput

Function oninput

src/components/inputhints/index.js:140–151  ·  view source on GitHub ↗

* @this {HTMLInputElement}

()

Source from the content-addressed store, hash-verified

138 * @this {HTMLInputElement}
139 */
140 function oninput() {
141 const { value: toTest } = this;
142 const matched = [];
143 const regexp = new RegExp(escapeRegExp(toTest), "i");
144 hints.forEach((hint) => {
145 const { value, text } = hint;
146 if (regexp.test(value) || regexp.test(text)) {
147 matched.push(hint);
148 }
149 });
150 updateUl(matched);
151 }
152
153 function onfocus() {
154 if (preventUpdate) return;

Callers

nothing calls this directly

Calls 2

updateUlFunction · 0.85
escapeRegExpFunction · 0.50

Tested by

no test coverage detected