Consider substituting optional BlobPart or sequence<BlobPart> for optional sequence<BlobPart> blobParts at constructor
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 118
- Forks
- 52
- Avg merge
- 9d 16h
- Merged PRs (30d)
- 1
Description
Per https://github.com/heycam/webidl/issues/868#issuecomment-609460584
In theory, the type of the argument could have been (BlobPart or sequence) and due to the algorithm for coercing a union type, a lone TypedArray would then end up recognized as a BlobPart rather than a sequence, I believe. That is probably what you were hoping for / would have found more intuitive.
BlobPart or sequence<BlobPart> could allow
new Blob(TypedArray)
to not be converted to a string.
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
Start with the Blob constructor definition and read the linked Web IDL issue comment about union-type coercion. Compare the current optional sequence blobParts parameter with the proposed BlobPart or sequence form, and document whether the change should be adopted and what new TypedArray behavior would result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100