I notice that when defining clientside javascript event, the functions do not get bound to the particular element.
If I write clientside javascript alert(this); for an onlick event, the alert box displays "[window]", instead of the clicked element.
Normal old style inline code <button onclick="alert(this)">Push</button> will display button element instead.
Also when binding using dojo.connect(button, "onclick", button, function () {alert(this);}) "this" will show correctly as the button element.
It is clear that we can always obtain the current element by using document.getElementById("#{id:ourelementid}"), still there does not seem to be a good reason not to implement this cleanly. or is there?
BTW does this also that we do not have means to obtain the event object as well? say for onkeypress - is there a way to find which key has been pressed? Edited: No, ok not as bad - thisEvent will do :-)