[resize-observer] Behavior when the callback modifies depth
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
Description
https://drafts.csswg.org/resize-observer-1/#html-event-loop
Calculate depth for node happens each time the "Gather active observations at depth" steps are run.
This implies that callback that changes the depth can trigger that observer getting called multiple times in one set of ResizeObserver notifications. For example, a call back could modify the DOM to add an element in its ancestor chain. This could lead to the steps never exiting.
One way to avoid this would be to compute the depth once per element at the start of firing ResizeObserver notifications.
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 linked Resize Observer specification section on the HTML event loop, especially “Calculate depth for node” and “Gather active observations at depth.” Determine whether callback-driven depth changes can repeatedly invoke an observer or prevent notification processing from ending; done means the specification behavior is resolved so notifications terminate consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100