[csswg-drafts] Pull Request: [resize-observer-1] Invoke callback with observer as 2nd argument and `this` value

shvaikalesh has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [resize-observer-1] Invoke callback with observer as 2nd argument and `this` value ==
This PR aligns [`ResizeObserver` spec](https://drafts.csswg.org/resize-observer/#broadcast-active-observations) (step 2.4) with [WPT](https://github.com/web-platform-tests/wpt/blob/e35de4d284f3272e3f914eb9deea6cf7d1924605/resize-observer/observe.html#L207), two implementations ([Chrome and Firefox](https://wpt.fyi/results/resize-observer/observe.html?label=experimental&label=master&aligned)), and other observers:
* [`MutationObserver`](https://dom.spec.whatwg.org/#notify-mutation-observers) (step 5.4);
* [`IntersectionObserver`](https://w3c.github.io/IntersectionObserver/#notify-intersection-observers-algo) (step 3.4);
* [`PerformanceObserver`](https://w3c.github.io/performance-timeline/#queue-the-performanceobserver-task) (step 3.3.5).

Passing `observer` to `callback` enables users to reuse a single `callback` function, which invokes [`unobserve`](https://drafts.csswg.org/resize-observer/#dom-resizeobserver-unobserve) with [entry's `target`](https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-target), for multiple `ResizeObserver` instances.

See https://github.com/w3c/csswg-drafts/pull/5383


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

Received on Saturday, 1 August 2020 22:13:57 UTC