servo / servo/html5ever

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

Open
#81 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.6k
Forks
288
Avg merge
2d 22h
Merged PRs (30d)
8

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/sink/rcdom.rs at the linked private function around lines 81-90 and trace how RcDom nodes store their parent and children. Add the public Node method requested for retrieving its index among the parent’s children; done means callers can use that index to identify adjacent siblings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.