On Nov 5, 2009, at 1:32 AM, Fredrik wrote:
I created a getElementsByClassName based on this code:
http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/
http://code.google.com/p/getelementsbyclassname/
Pending a full selector integration something like this should be an
easy drop-in
solution to optimize getElementsByTagAndClassName.
(IE really needs some speedup here..)
// Fredrik Blomqvist
On Nov 5, 7:45 am, Amit Mendapara mendapara.a...@gmail.com wrote:
Look at my mochikit-ext project athttps://launchpad.net/mochikit-ext.
I have implemented a jQuery style API in MochiKit.Query module
(http://
bazaar.launchpad.net/~amit-mendapara/mochikit-ext/trunk/files) which
is based on Sizzle.js (http://github.com/jeresig/sizzle).
MochiKit.DOM.getElementsByTagAndClassName(div, some-class)
can be replaced with
MochiKit.Query(div.some-class).get()
The Sizzle.js is the fastest selector engine out there.
Seehttp://www.hvergi.net/arnar/public/sizzle/speed/#for
the speed tests.
Actually, it's not. The Acme engine in Dojo beats it by a fair bit on
most real-world selectors. It's stand-alone and can be easily imported
(like Sizzle).
Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to
mochikit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---