W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

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

From: Simon Fraser via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Mar 2019 21:01:48 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-416990905-1551733307-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:57 UTC