Re: [mediacapture-screen-share] Distinguish cancellations from absent OS permissions (#281)

> * Their [constructor operation](https://webidl.spec.whatwg.org/#idl-constructors) must take as its first parameter an [optional](https://webidl.spec.whatwg.org/#dfn-optional-argument) [DOMString](https://webidl.spec.whatwg.org/#idl-DOMString) named message defaulting to the empty string, and must set the instance’s [message](https://webidl.spec.whatwg.org/#domexception-message) to message.
>* Their [constructor operation](https://webidl.spec.whatwg.org/#idl-constructors) should take as its second parameter a [dictionary](https://webidl.spec.whatwg.org/#dfn-dictionary) containing the additional information that needs to be exposed.

My reading here is that this is recommending a non-optional dictionary. But I guess the dictionary could have a default value to the `reason`. However, I think defaulting a reason would be a footgun. I'd prefer to specify that the ctor errors out if no reason is provided. Wdyt?

-- 
GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/281#issuecomment-1740858504 using your GitHub account


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

Received on Friday, 29 September 2023 12:58:52 UTC