[csswg-drafts] [¶esize-observer] Unclear if ResizeObservation constructor takes a ResizeObserverOptions or a ResizeObserverBoxOptions (#7548)

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

== [¶esize-observer] Unclear if ResizeObservation constructor takes a ResizeObserverOptions or a ResizeObserverBoxOptions ==
The `ResizeObserver` iterface (https://drafts.csswg.org/resize-observer/#resizeobserver) has

```js
undefined observe(Element target, optional ResizeObserverOptions options = {});
```

Defined as https://drafts.csswg.org/resize-observer/#dom-resizeobserver-observe

> Adds target to the list of observed elements.
> 1. If target is in [[[observationTargets]]](https://drafts.csswg.org/resize-observer/#dom-resizeobserver-observationtargets-slot) slot, call unobserve(target).
> 2. Let resizeObservation be new [ResizeObservation](https://drafts.csswg.org/resize-observer/#resizeobservation)(target, options).
> 3. Add the resizeObservation to the [[[observationTargets]]](https://drafts.csswg.org/resize-observer/#dom-resizeobserver-observationtargets-slot) slot.

So it's constructing a `ResizeObservation` with a `ResizeObserverOptions` as the 2nd argument.

The WebIDL constructor for `ResizeObservation` doesn't include the 2nd parameter (#7547), but it's defined as:

> new ResizeObservation(target, observedBox)
> 
> 3. Set this internal [observedBox](https://drafts.csswg.org/resize-observer/#dom-resizeobservation-observedbox) slot to observedBox

where the internal observedBox is a `ResizeObserverBoxOptions`:

```js
readonly attribute ResizeObserverBoxOptions observedBox;
```

> observedBox, of type [ResizeObserverBoxOptions](https://drafts.csswg.org/resize-observer/#enumdef-resizeobserverboxoptions), readonly
> Which box is being observed.

So it's not clear at which point the `ResizeObserverOptions` is unwrapped to obtain the underlying `ResizeObserverBoxOptions`.

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


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

Received on Sunday, 31 July 2022 21:08:26 UTC