Skip to content

proxy dot-traversal into first element #13

Description

@CooHunter

Im learning DOM from the code, I dont understand why you offer the first element instead of traverse it.
eg: I have two ul elements.

<ul><li>1</li><li>2</li></ul>
<ul><li>3</li><li>4</li></ul>

now HTML.body.ul.li only get the first ul's li, its very odd. and the second ul dont inherit any methods, i must use HTML.ify to initial it by manully.

How about write like this:

if (force || !list.each) {
     if (!list.slice){ list = _.slice.call(list); }
        _.methods(list);
        for (var i = 0, len = list.length; i < len; i++) {
            _.node(list[i], force);
       }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions