If for example I have the next event:
document.getElementById('TagSearchInput').onkeyup = function(e)
{
//Code...
}
Inside the event, there is a condition where I recreate the element (TagSearchInput). How can I refresh the event selector, from within the event?
OK, ignoring any questions about why you’d be recreating the input…
Rather than using an anonymous function try something like this:
(Optionally put all of the above inside an immediately-invoked-anonymous-function if you want to keep the
TSIKeyupHandler()function out of the global scope.)