On Oct 13, 1:34 pm, expresso <dschin...@gmail.com> wrote:
> I don't think it's too hyped.  Having calls to javascript in your
> elements defeats the purpose of unobtrusively maintaining and using
> libraries like jQuery.

The mechanism frequently used to attach such listeners is to add a
class, id, name or some other attribute value designed to make the
element identifiable specifically to add a listener. How is:

  <div class="mySpecialClass" ...>

hugely different to:

  <div onclick="mySpecialListener()" ...>

when both attributes can be added using exactly the same server logic,
static template or whatever? The only difference is that in the first
case, the client must do extra work to attach listeners that could
have been added on the server directly.

Consider also that in the second case, you don't care about a document
ready or load event, or whether the user must wait for elements to be
"enlivened" while other content loads. Not hip, not cool or funky, but
very robust and avoids a bunch of issues.

Adding listeners at the client simply because the chosen development
library supports it is not a particularly convincing argument.


--
Rob

Reply via email to