MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / clearSearchText

Function clearSearchText

assets/js/WikiSearch.js:52–59  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

50};
51
52const clearSearchText = (event) => {
53 event.preventDefault();
54 document.getElementById("search").value = "";
55 const clear = document.getElementById("clear");
56 clear.classList.add("none");
57 clear.classList.remove("flex");
58 setSearchFocus();
59};
60
61const clearPushListener = (event) => {
62 if (event.key === "Enter" || event.key === " ") {

Callers

nothing calls this directly

Calls 1

setSearchFocusFunction · 0.85

Tested by

no test coverage detected