Imagine having a version of jQuery which will tell you that your code
is slow,bad etc ... ?
jQueryLINT
That would not be technically demanding but would be very usefull ...
Just a "slector analyzer" interceptor inside $() would be truly
usefull ...

if ( selector === "*" ) console.warn("Are you really sure you want to
do $('*') ?") ;

Or inside bind() :

if ( jqLint.not_suitable_for_binding( this.selector ) ) console.warn
("Are you relly sure you want to bind to " + this.selector )

--DBJ

On Jan 14, 2:49 pm, Yehuda Katz <wyc...@gmail.com> wrote:
> Do people not know that $("*").anything is very slow?
>
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
>
>
>
> On Wed, Jan 13, 2010 at 2:16 PM, ajpiano <ajpi...@gmail.com> wrote:
> > The fact that $("*").bind() is WAY worse than $(document).bind()
> > really ought to be shouted from the rooftops.
>
> > On Jan 13, 11:46 am, John Resig <jere...@gmail.com> wrote:
> > > Well, before we had a very "non-silent" failure - and that was causing
> > > his, and others, applications to break. I'm a firm believer that good
> > > documentation is a proper anecdote to silence (hence the API docs are
> > > updated to mention this change in 1.4 and it'll be in the release
> > > notes).
>
> > > --John
>
> > > On Wed, Jan 13, 2010 at 11:40 AM, DBJDBJ <dbj...@gmail.com> wrote:
> > > > @John : your patience has no limits ...
>
> > > > Although "silent failures" are a "big no-no" in computing, since
> > > > primordial times ?
>
> > > > Nice and fresh text :
> > > >http://partnerteamblog.shavlik.com/2009/09/02/the-silent-failure-that.
> > ..
>
> > > > And something *much* closer to jQuery users :
> > > >http://cafe.elharo.com/programming/in-praise-of-draconian-error-handl.
> > ..
>
> > > > 1.5 perhaps ...
>
> > > > On Jan 13, 4:26 pm, John Resig <jere...@gmail.com> wrote:
> > > >> Hello -
>
> > > >> This is due to the fact that we removed the ability to bind data()
> > > >> (and thus events) to object, embed, and applet elements in 1.4.
> > > >> Allowing it was causing uncatchable exceptions to be thrown when used
> > > >> along with with Java applets.
>
> > > >> The commit:
> >http://github.com/jquery/jquery/commit/59802928566b6be3a66d65e77c2418...
>
> > > >> Looking at your code I see:
> > > >>                 $("*").keypress(function(e) {
> > > >>                         if (e.which == 13) {
> > > >>                                 Login();
> > > >>                         }
> > > >>                 });
>
> > > >> You should probably change that to (not only will it be significantly
> > > >> faster but it'll work just fine with 1.4rc1):
> > > >>                 $(document).keypress(function(e) {
> > > >>                         if (e.which == 13) {
> > > >>                                 Login();
> > > >>                         }
> > > >>                 });
>
> > > >> Regardless, I just landed a fix to make sure that no exception is
> > > >> thrown (silently fails instead).
> >http://github.com/jquery/jquery/commit/1960f28c0bf75b16e88460d6135058...
>
> > > >> --John
>
> > > >> On Wed, Jan 13, 2010 at 10:13 AM, Jonas Åradsson
>
> > > >> <jonas.arads...@gmail.com> wrote:
> > > >> > Hey jQuery team
>
> > > >> > I got the attached error when I substituted jQuery 1.3.2 with 1.4
> > rc1.
>
> > > >> > A working example of the same page running 1.3.2 can be found here:
> > > >> >http://www.boliga.dk/map.aspx?id=374261
>
> > > >> > Regards
> > > >> > /Jonas
>
> > > >> > ----------------------------------------
> > > >> > Boliga
> > > >> > Jonas Åradsson
> > > >> > Partner and founder
>
> > > >> > jo...@boliga.com
> > > >> > TEL +45 4358 3071
> > > >> > MOB +45 4099 2636
>
> > > >> > Boliga ApS
> > > >> > Blegdamsvej 104 A, 2.
> > > >> > 2100 København Ø
>
> > > >> >www.boliga.dk
> > > >> > LinkedinFacebookTwitter
>
> > > >> > --
> > > >> > You received this message because you are subscribed to the Google
> > Groups
> > > >> > "jQuery Development" group.
> > > >> > To post to this group, send email to jquery-...@googlegroups.com.
> > > >> > To unsubscribe from this group, send email to
> > > >> > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegrou
> > > >> >  ps.com>
> > .
> > > >> > For more options, visit this group at
> > > >> >http://groups.google.com/group/jquery-dev?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups "jQuery Development" group.
> > > > To post to this group, send email to jquery-...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegrou 
> > ps.com>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/jquery-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jQuery Development" group.
> > To post to this group, send email to jquery-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegrou 
> > ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jquery-dev?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to