Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Rename Element#subNodes to Element#children? and more

#163

Maybe you could rename Element#subNodes to Element#children, so the name is more a more along the line of Element#siblings and Element#parent.
I'm not sure if this is even possible, as there is already a property called children...

(And maybe the Element#parents method could be renamed (or alias-ed) Element#ancestors, as I think this is a more descriptive term...) (Element#descendants would be nice too, as an alias to Element#select)

Reported by Douwe M. · January 7th, 2010 @ 06:56 PM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Douwe M.
    Douwe M.
    • Title changed from Rename Element#subNodes to Element#children? to Rename Element#subNodes to Element#children? and more

    January 7th, 2010 @ 07:07 PM

  2. MadRabbit
    MadRabbit
    • State changed from new to invalid
    • Tag changed from aliases, element#children, element#subnodes, idea, renaming to element#children, element#subnodes, idea
    1. No aliases on RightJS, although I've already have couple of them. Aliases are evil, and one of the first rules on RightJS is a simple, clean API. No aliases. Only over my dead body. 8)

    2. 'children' is a conflicting name

    3. 'parents' is more natural, coz .parentNode and it's shorter and less miss-printable than 'ancestors', same for 'descendants' and 'select'.

    January 8th, 2010 @ 01:20 PM

  3. Douwe M.
  4. MadRabbit
    MadRabbit

    It's not all that bad. I'm just want to keep a clear single interface in the core so didn't get people in troubles like, someone reassigned one alias, but the other was pointing to an old method. Those things tend to get really messy over the time.

    If you like the Prototype names, you can just write a plugin that will contain the aliases, similarly how I did for right-rails implementing Ruby style interface.

    January 8th, 2010 @ 08:23 PM

  5. Douwe M.
    Douwe M.

    Yeah, I understand ;-)

    January 8th, 2010 @ 08:27 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.