Re: [mediacapture-screen-share] Address nullability of DisplayMediaStreamOptions.controller (#236)

> https://dom.spec.whatwg.org/#dictdef-addeventlisteneroptions for instance. Handled here https://dom.spec.whatwg.org/#event-flatten-more (note that internally not given is represented as null, but null cannot be passed on the JS side).

Thanks for those links. That does seem to set a precedent. I still have my questions/doubts above though.

The link also illustrates a common expectation to use `null` in implementation code. But I agree this is a separate concern: A benefit of defaults in my mind os to simplify prose (and implementations) by capitalizing on the invariants they provide so we don't need to write so many `if`s in prose. In the AddEventListenerOptions case, had `undefined` been used internally, I suppose the prose could be simplified to
```
Let passive be options["passive"].
Let signal be options["signal"].
```
? That seems to gel with https://github.com/whatwg/webidl/issues/905.

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


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

Received on Friday, 30 September 2022 18:11:09 UTC