I'm not sure how this relates to TestSwarm but could you provide some
more information about the cross-browser nature of .text? Preferably
with proof that it works in all the browsers that jQuery supports.

If so then I don't think I'll have a problem switching to it.

--John



On Sun, Nov 29, 2009 at 8:50 AM, Andrea Giammarchi
<andrea.giammar...@gmail.com> wrote:
> Hi guys,
> I know there is nothing about it in the W3C specs but AFAIK the text
> property seems to be a de-facto standard as innerHTML is.
> Since jQuery is using test swarm I wonder if it could be cleaned/speed up a
> little bit avoiding the appendChild with a document.createTextNode and using
> just text property.
>
> This will make jQuery initialization a bit faster, without a try catch plus
> other specific operations in the support.js file and the globalEval smaller.
>
>       // Evalulates a script in a global context
>       globalEval: function( data ) {
>               if ( data && rnotwhite.test(data) ) {
>                       // Inspired by code by Andrea Giammarchi
>                       //
> http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
>                       var head = document.getElementsByTagName("head")[0] ||
> document.documentElement,
>                               script = document.createElement("script");
>
>                       script.type = "text/javascript";
>                       script.text = data;
>
>                       // Use insertBefore instead of appendChild  to 
> circumvent an IE6 bug.
>                       // This arises when a base node is used (#2709).
>                       head.insertBefore( script, head.firstChild );
>                       head.removeChild( script );
>               }
>       },
>
> 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-...@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.
>

--

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