[csswg-drafts] [resize-observer] Should "resize loop error notification" be a warning instead of an error? (#5488)

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

== [resize-observer] Should "resize loop error notification" be a warning instead of an error? ==
* please tag the issue title with the spec's shortname, like `[css-foo]`
  (this is the name from the spec URL, without a level number unless the issue is specific to that level).
  If you're proposing a new feature that doesn't obviously fit in an existing spec, skip this part — don't make something up.

* please be specific (in the title and issue) about what you want to change:
  “make it better” means different things to different people!

* please link to the spec section you're talking about, or at least the spec

The spec says

> Infinite loop is prevented by shrinking the set of nodes that can notify at every iteration. In each iteration, only nodes deeper than the shallowest node in previous iteration can notify.
> 
> An error is generated if notification loop completes, and there are undelivered notifications. Elements with undelivered notifications will be considered for delivery in the next loop.


which seems like the intent is for this to be a warning, because behavior is not to halt a program, but to advise that remaining resize observations will be fired in the next loop.

In Chrome the message is `ResizeObserver loop limit exceeded`. Valid error handling code (as a search for this on GitHub shows) gets caught up by this error and programs are unintentionally halted for what seems like a warning.

As an example (at time of writing this), https://lume.io/docs/#/examples/shadow-dom shows that this error can cause unexpected termination of a program (downside the window to trigger it).

Here are some GitHub issues showing users having issues with termination by 3rd libraries due to this "error": https://www.google.com/search?q=site%3Agithub.com%20ResizeObserver%20loop%20limit%20exceeded&cad=h

I think perhaps treating this as a warning might be a better deal.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 30 August 2020 23:34:32 UTC