On Sat, Jul 19, 2008 at 12:39 PM, Declan <dolough...@gmail.com> wrote:
>
> Should support for document.getElementsByClassName be added to FORK?
> Something like:
[snip implementation]
Actually Fork v0.1 does have a function like your suggestion. It does
not first try the native API as that has been introduced in some
browsers since v0.1 was released.
http://forkjavascript.org/dom/docs#getElementsByClass
I do want to continue to have this functionality in v0.2 which is
under construction. I think all the DOM finders will be combined an
exposed with a single API
FORK.find(cssSelector, rootEl)
Which returns an array of elements (could be empty, one element or
more elements, but always an array.)
This new FORK.find function will use the newer native browser APIs for
enhanced preformance (though I've never had a speed problem yet.)
Perhaps I should post a complete API for Fork v0.2 as it stands now.
There are some smallish details upon which I have not completely
decided and feedback is welcome. If anyone is interested, please speak
up and I will prepare a preliminary spec for the v0.2 API and post it
here.
Peter
Ahh. Then yes. It should have that and it will.
Thanks,
Peter