W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > June 2022

[mediacapture-region] CropTarget.fromElement should not be exposed to workers (#64)

From: François Beaufort via GitHub <sysbot+gh@w3.org>
Date: Thu, 09 Jun 2022 08:56:51 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-1265814476-1654765007-sysbot+gh@w3.org>
beaufortfrancois has just created a new issue for https://github.com/w3c/mediacapture-region:

== CropTarget.fromElement should not be exposed to workers ==
[Current IDL](https://w3c.github.io/mediacapture-region/#crop-target) says `CropTarget` is exposed to workers.
However, as a worker does not have access to the DOM, and by consequence `Element`, it does not make sense to expose `CropTarget.fromElement()` to workers.

I propose updating the IDL as below.

 [Exposed=(Window,Worker), Serializable]
 interface CropTarget {
-  [SecureContext] static Promise<CropTarget> fromElement(Element element);
+  [Exposed=Window, SecureContext] static Promise<CropTarget> fromElement(Element element);

What do you think folks?

Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/64 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 9 June 2022 08:56:52 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:57 UTC