Re: [csswg-drafts] [css-contain] If a ResizeObserver callback changes the `content-visibility` of an element, should that prevent observations of the same resize event? (#7746)

This seems somewhat analogous to #6493:

```html
<div id="test">test</div>
<script>
var ro1 = new ResizeObserver(() => {
  console.log("ro1");
  ro2.unobserve(test);
});
ro1.observe(test);
var ro2 = new ResizeObserver(() => {
  console.log("ro2");
});
ro2.observe(test);
</script>
```

This will log both `ro1` and `ro2`, i.e. the ro2 callback will be invoked even if it's no longer observing any element.

So I think that your testcase should be consistent with this, first determine the active observations, then broadcast them regardless of whether some callback does something that would have avoided some observation.

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


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

Received on Thursday, 15 September 2022 15:22:44 UTC