On 10/6/06, Matt Goodall <[EMAIL PROTECTED]> wrote:
> My only real comment is on the packaging and naming.
>
> At the moment it's MochiKit.Selector.findChildElements(element,
> expressions). I think MochiKit.DOM.getElementsBySelector(expression,
> element=document) seems more in keeping with the rest of MochiKit.
>
> MochiKit.DOM because I'm searching for DOM elements and it fits nicely
> alongside getElement and getElementsByTagAndClassName.
>
> element as the last arg, defaulting to document, because it makes it
> more consistent with getElementsByTagAndClassName and covers the
> common usecase of searching the whole document.
>
> expression because I can't think of a time I've ever called cssQuery
> with multiple expressions.
I absolutely agree - the reason I put it in a seperate package was
just to make it work and then let the Mochikit developers decide where
to put it if they wanted to put it anywhere at all :o)
MochiKit.DOM.getElementBySelector would be my first choice as well as
putting the "scope" element at the back. Do you think the Selector
"class" should also reside in MochiKit.DOM ?
As for expression I also agree and in fact I'd even like to allow
comma-seperated expressions as that's more in lieu with CSS syntax.
Like this
elementsforTOC = getElementBySelector("h1, h2, h3")
> Hope the feedback is useful. Thanks again.
Thanks to you sir ! :o)
Arnar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---