Re: [mediacapture-handle] Specify event handling with algorithms (#56)

For a user agent to trigger anything JS-observable, we must start from _"When something happens, the user agent MUST [queue a task](https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task)"_ as I show [above](https://github.com/w3c/mediacapture-handle/issues/56#issue-1223376314), to preserve [run-to-completion semantics](https://w3ctag.github.io/design-principles/#js-rtc).

The "Update JS-observable state" step would be to set a `[[CaptureHandle]]` internal slot to its new value. We'd then update the getCaptureHandle method to simply return`[[CaptureHandle]]`. 

See [When the underlying DTLS transport needs to update the state](https://w3c.github.io/webrtc-pc/#dfn-dtlstransportstate) for an example.

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


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

Received on Tuesday, 3 May 2022 20:08:37 UTC