[resize-observer] Populating a ResizeObserverEntry needs to use FrozenArray
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
https://drafts.csswg.org/resize-observer-1/#create-and-populate-a-resizeobserverentry
- Set this.borderBoxSize slot to result of computing size given target and observedBox of "border-box".
- Set this.contentBoxSize slot to result of computing size given target and observedBox of "content-box".
- Set this.devicePixelContentBoxSize slot to result of computing size given target and observedBox of "device-pixel-content-box".
"calculate box size" seems to return a ResizeObserverSize (#7615), but ResizeObserverEntry's borderBoxSize, contentBoxSize and devicePixelContentBoxSize aren't ResizeObserverSizes, they are FrozenArray<ResizeObserverSize>.
I guess the algorithm should use https://webidl.spec.whatwg.org/#dfn-create-frozen-array
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 at the linked Resize Observer specification section and compare the ResizeObserverEntry slots with the WebIDL FrozenArray definition and its create-frozen-array algorithm. Update the population steps so borderBoxSize, contentBoxSize, and devicePixelContentBoxSize match their declared FrozenArray types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100