Performance based event handler in JavaScript.