Re: [mediacapture-region] Why expose produceCropTarget at MediaDevices level? (#11)

> creating multiple elements in a single page with the same ID.

What about a single page with multiple third party iframes?

> Note that it obtains the second property via the tuple `(event.source, element.id)`

I am not sure how event.source would actually work in all cases, for instance if source is a MessagePort, or if there is no source (post message to a dedicated worker) or in case of double post messaging.

To have full support, we would need to introduce a serialisable context weak reference and pass it along the ID.
This does not seem too bad to me, especially if the context weak reference might have some use in other contexts.

Another thing to consider is that the ID can refer to one element at a given point in time and to another one later on. This might make dynamic cropping easier for web developers but UAs would need to be prepared for that.

> is this an advantage or a disadvantage?

The current API does not allow to go back from element weak reference to element, which is okayish (application can pass along application specific data for that purpose) but is a bit sad conceptually.
Adding that ability would be nice.

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/11#issuecomment-1113033913 using your GitHub account


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

Received on Friday, 29 April 2022 08:35:43 UTC