Re: [compute-pressure] Move source to options (#262)

My understanding is that "source" (or even "sources" depending on the outcome of #258 and the above) will always be a required parameter given the semantics of this API. This is similar to `element` or `target` in [MutationObserver](https://dom.spec.whatwg.org/#dom-mutationobserver-observe), [IntersectionObserver](https://w3c.github.io/IntersectionObserver/#idl-index) and [ResizeObserver](https://drafts.csswg.org/resize-observer/#idl-index), so from a spec or IDL perspective it feels confusing to have it as part of PressureObserverOptions, as `options` is an optional parameter for `observe()`.

You could also make it a `required` PressureObserverOptions member and stop making `options` optional, but it feels contrary to https://w3ctag.github.io/design-principles/#optional-parameters (other parameters are indeed optional) and https://w3ctag.github.io/design-principles/#prefer-dictionaries.

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/compute-pressure/issues/262#issuecomment-2049468347 using your GitHub account


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

Received on Thursday, 11 April 2024 11:23:36 UTC