Garrett said:
Thomas said:
Garrett Smith wrote:
kangax wrote:
Thomas 'PointedEars' Lahn wrote:
Martin Rinehart wrote:
But don't event handler attributes have their own problems
- notably a somewhat idiotic scope augmentation?
Wouldn't it be recommended to use something along these lines:
[snip]
The approach of assigning an event handler via script separates
the attachment from from the content, so the script can be moved
around to different place in the document.
And completely separating the function from the markup it is
operating on (and with) is a Good Thing, because ...?
[...]
<snip>
That story gets put about as if it is some sort of universal panacea.
When the contents that the reader is interested in are at the top of the
document then putting them where they can be read as soon as possible
might be a good ides. But it can be an irritating pain if what you are
interested in is at the bottom of the page (such as the latest comments
on a blog that you have already read) and the loading of the scripts at
the bottom of the page block the ability to scroll. In that case I would
rather not have the top of the page sitting there taunting me while the
browser is not allowing me to scroll to what I am interested in.
It may be that the real issue is attempting to download too much script
code, and playing around with where that code is loaded is just playing
with the symptoms rather than addressing the cause.