html5ever icon indicating copy to clipboard operation
html5ever copied to clipboard

Add a method to get a Node's index in its parent's children in RcDom

Open utkarshkukreti opened this issue 9 years ago • 2 comments

A private function to calculate it already exists here, and I need access to this info to get the next/previous sibling of a Node for a project I'm working on.

I'll be happy to submit a pull request if you could tell me where is the best place to add this.

utkarshkukreti avatar Jan 31 '15 09:01 utkarshkukreti

I’d review/merge a pull request to do this.

You might also be interested in https://github.com/SimonSapin/kuchiki, although it is still very early work-in-progress. (Node::get_{next,previous}_sibling is built-in and takes O(1) time in Kuchiki.)

SimonSapin avatar Jun 17 '15 22:06 SimonSapin

Since this issue is pretty old at this point I figured I'd ask a followup: Is there an idiomatic way to access a node's siblings?

murtyjones avatar Jun 18 '19 17:06 murtyjones