[csswg-drafts] [resize-observer] Behavior when the callback modifies depth (#3704)

smfr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [resize-observer] Behavior when the callback modifies depth ==
https://drafts.csswg.org/resize-observer-1/#html-event-loop

[Calculate depth for node](https://drafts.csswg.org/resize-observer-1/#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.




Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3704 using your GitHub account

Received on Monday, 4 March 2019 21:01:50 UTC