html5ever
html5ever copied to clipboard
Add a method to get a Node's index in its parent's children in RcDom
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.
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.)
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?