Re: [csswg-drafts] [resize-observer] Consider a mode to indicate that a single pass is all that is needed / perform double settlement pass (#6173)

Preface: ResizeObserver v2, when used correctly, should make this problem a lot less common. v1 only allowed you to observe content box, so changing own border/padding triggered the error. In v2, you can observe either a content box, or border box.

#5023: csswg has already taken a look, but there has not been a resolution. Standard processes can take a while. If you are very passionate about this, I'd suggest coming up with a detailed proposal. This will give csswg  a cleaner path towards resolution. Something like this:

1) Why this is a problem. 
Problem description, something like: RO error handling makes it hard for developers to use RO correctly. Some errors can be completely ignored, other should not be. There is no way to tell inside the error handler which ones are which.
Examples of the problem in the wild: how are the developers handling it not by fixing the core of the problem, but doing inefficient things: "they just ignore all RO errors", "work is delayed to rAF". These examples should demonstrate why is the existing API failing.

2) Proposal for fixing the problem
Turning this into a warning is probably a non-starter.  windows.onwarning API does not exist, and all the problems inherent in this being an error still remain. I have not seen any proposal that made me think "yeah, we should do that!".  Maybe something like ResizeObserver.ignoreError() that gets called inside the RO event handler? You'd probably want ignoreError to be selective (ignore only errors underneath me?) 

3) Show how this proposal would fix problems shown in 1)

4) Bonus points: polyfill showing off the solution today

-- 
GitHub Notification of comment by atotic
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6173#issuecomment-812315243 using your GitHub account


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

Received on Friday, 2 April 2021 04:48:38 UTC