What parameters get passed to a DOM onclick handler? How are the parameters resolved/what is the execution context of a DOM onclick handler?
See this jsbin (use the browser dev console as the jsbin one isn't very good) or the code below:
<!-- Remove the id="someid" and see what happpens -->
<input type="text" id="someid" onclick="clickHandler(this,event,someid)'"/>
<script>
function clickHandler() {
console.log(arugments);
}
</script>
References
Additional Details
I realize that attaching events in the DOM is not recommended. But this technique is still used on legacy applications and I cannot find any documentation that goes beyond passing a handler the 'this' parameter.