@DBJIn your single-file example you use JScript conditional comments, but
these are only compatible with IE detection, you should be able to document
*any* browser exceptions. So you have to extend the possible parameters or
create your own way of commenting the files.

A quick example:
inArray = function( elem, array ) {

/* @browser IE, Opera<10, Safari
  * Creates correct inArray function when browser does not support native
array.indexOf
  * Use === because on IE, window == document
  */
 for ( var i = 0, length = array.length; i < length; i++ )
 if ( array[ i ] === elem )
return i;
 return -1;
/* @standard */
  return array.indexOf(elem);
 /* @ */

}

This function starts with the compatible part, so the standards-compliant
part will never be executed. But when you parse the file you can easily
create different files for each browser family or even version.
The static compiled jQuery is then compatible with the lowest version that
needs to be supported. So an 'IE-all' version will need a lot more
compatibility than an 'IE7' version, this way you can create static version
for use in intranets where the version is always known. This same commenting
can be used to create a compatible version on the fly. I would propose
comment tags not only for browser, but also certain base features, this way
you could use tags like @boxmodel that correspond with feature detection.
Once a script is created that generates jQuery static versions based on
certain browser support everyone could roll their own jQuery by checking the
compatibility required for their project. There can potentially be hundreds
of different version each with different purpose.
The standard official minified version is obviously stripped of these
comments and extra code.

Now the testswarm exists a project like this can finally be created without
requiring a monumental effort to test each version. When the standard way
does not work as you expect you just add that browser version to the
compatible conditional comment.

Regards,
THD


On Thu, Sep 3, 2009 at 10:19 AM, DBJDBJ <dbj...@gmail.com> wrote:

>
> @Andrea: ok, I should have written: Andrea is *reporting*, on
> TaskSpeed results ;o)
>
> Sometimes I have this "funny feeling" we are doing nothing else but
> supporting the IE...
>
> --DBJ
>
> On Sep 3, 7:55 am, Andrea Giammarchi <andrea.giammar...@gmail.com>
> wrote:
> > On Thu, Sep 3, 2009 at 2:33 AM, DBJDBJ <dbj...@gmail.com> wrote:
> >
> > > @dz: At last a number for you ;o) Andrea says that IE versions of jQ
> > > are 10 times slower ...
> >
> > just to avoid misunderstanding, it's not me saying that, there are
> > TaskSpeed  numbers here.
> > Btw, what I meant is that IE is by default slower than others, and to be
> > honest, I do not mind that much about IE, it's a companies choice that is
> > simply partially blocking web development. We all need to support it, if
> we
> > work in IT out of an intranet, but we cannot do miracles.
> >
> > Regards
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@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