Refactor text() et al to share more infrastructure with Fetch
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 118
- Forks
- 52
- Avg merge
- 9d 16h
- Merged PRs (30d)
- 1
Description
Andrea implemented these methods in Firefox and ended up using a shared abstraction with our code for Fetch.
If I look at https://fetch.spec.whatwg.org/#concept-body-consume-body and https://w3c.github.io/FileAPI/#text-method-algo side-by-side it seems quite doable to have less duplication here.
(We might want to point out the one major difference though, which is that File API will create an endless series of streams for the same underlying data where in Fetch that'd require explicit cloning.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Fetch “concept-body-consume-body” algorithm alongside the File API “text method algorithm” linked in the issue, starting with the shared steps and their stream-handling assumptions. The work is done when text() and related methods reuse more common infrastructure while preserving File API’s repeated-stream behavior rather than requiring explicit cloning.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, web-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100