_ = /*b.b.Troy III p.a.e (© 2001)*/document.getElementsByTagName("*")||document.all;
1
Contributor
1
Reply
7
Views
5 Years
Discussion Span
Last Post by Troy III
0

I thought so... :) -additionally,
it is also the major reason a lot of people did; (ie, started using jQuery and alike).

The need for these was rised with W3C introduction of the "document.getElementById('id')" which in fact, is a failsafe method.

I always thought that somebody else ( or even lots of others ) will soon come up with the same solution.
-But, "it's been while…"

The underDot is the shortest platform possible;
It allows you to target elements (almost) the way it was meant to:

_.elementID; and even when using wrong ID definition as: _["my Element ID"] ;

The benefits:
Most of the time, people are using heavy libs, just so they can avoid the "document.getElementById" syntax and target them more naturally like "hey('Jim')", instead of say "cityCouncil.getMeTheCitizenWithID('Jim')";
which in turn, does good to the web as a whole. Because, to much bandwidth is being wasted on long robust lines of code (that are never being used in practice), already. And your own code becomes shorter cleaner and more straightforward.

You also don't have to wait for the page load, or DOM init., or browser detection for this feature to become available.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.