0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-24 15:08:22 -05:00

feat: add a function to clear search input text on click event (#394)

This commit is contained in:
neon_arch 2024-09-29 21:49:12 +03:00
parent 9ff9493f8e
commit fdd37f4d4e

View File

@ -32,3 +32,10 @@ searchBox.addEventListener('keyup', (e) => {
searchWeb() searchWeb()
} }
}) })
/**
* A function that clears the search input text when the clear button is clicked.
*/
function clearSearchText() {
document.querySelector('.search_bar input').value = ''
}