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

Function syncSearchClone

src/components/searchbar/index.js:214–218  ·  view source on GitHub ↗

* Keep a visible search-result clone in sync after the backing item updates. * @param {HTMLElement} $clone * @param {HTMLElement} $item

($clone, $item)

Source from the content-addressed store, hash-verified

212 * @param {HTMLElement} $item
213 */
214 function syncSearchClone($clone, $item) {
215 $clone.className = $item.className;
216 $clone.innerHTML = $item.innerHTML;
217 syncCheckboxState($clone, $item);
218 }
219
220 /**
221 * Sync the checked property of checkbox and radio elements, since cloneNode and innerHTML do not copy/preserve dynamic checked state.

Callers 1

cloneSearchItemFunction · 0.85

Calls 1

syncCheckboxStateFunction · 0.85

Tested by

no test coverage detected