Not being too familiar with the Selector internals, I added a test for a
dynamically set id.  It appears to work fine, so I updated the patch with
the additional test.

Good call on IE not using XPath, so it won't be as fast as I originally
thought.  Still, it is such a rare scenario that performance shouldn't
matter as much as keeping the solution simple and concise, IMO.

On 6/17/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>
> On 6/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > is there some performance difference between these two code? Thanks
>
>
> Using the CSS selector instead of Enumerable enables the use of XPath. But
> since IE doesn't support XPath and the hack above is for IE and Opera, I'd
> dare to say that there is no much difference in execution time. One more
> thing:
>
>   $$('*[id=' + id + ']')
>
> Am I right when saying that this will fail if the ID was dynamically set
> (in other words, it was not an attribute in HTML source)?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to