W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2020

[csswg-drafts] [resize-observer] observe() not triggering initial callback (#5529)

From: Joe Pea via GitHub <sysbot+gh@w3.org>
Date: Fri, 18 Sep 2020 19:32:59 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-704607663-1600457578-sysbot+gh@w3.org>
trusktr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [resize-observer] observe() not triggering initial callback ==
Has this more recently changed to where `new ResizeObserver(...).observe(el)` no longer triggers an initial observation? Or do I experience a browser bug?

Running this in Chrome console does not show any output:

```js
new ResizeObserver(() => console.log('change')).observe(document.body)
```

If we don't get the initial firing of the callback, how do we manually calculate the `borderBoxSize` and `contentBoxSize` arrays? It seems fairly complicated to get come up with that data (and that's why it's nice to receive it in the callback).

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 18 September 2020 19:33:01 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:16 UTC