wintercg / proposal-common-minimum-api

https://common-min-api.proposal.wintercg.org/
Other
216 stars 15 forks source link

Explore relationship with ShadowRealms, [Exposed=*] #21

Open littledan opened 2 years ago

littledan commented 2 years ago

ShadowRealms support some Web APIs, through the new notation [Exposed=*] in WebIDL, see https://github.com/tc39/proposal-shadowrealm/issues/331. We should consider examining the list of APIs exposed in this way and comparing it to the WinterCG list. I'd hope that, ideally, the [Exposed=*] list is a subset of the WinterCG list; if we deviate from that, we should understand why.

legendecas commented 1 year ago

I'm supportive of this. Defining a common minimum API list in the ShadowRealm can definitely help people to know the commonality of these runtimes.

I'd hope that, ideally, the [Exposed=*] list is a subset of the WinterCG list; if we deviate from that, we should understand why.

I'm wondering if events like ErrorEvent or PromiseRejectionEvent are common to WinterCG. It should meet the bar of at least two runtimes implemented them, but I suppose they are not going to be implemented in Node.js anyway.

littledan commented 1 year ago

We discussed this list in the 2022-07-14 WinterCG call. The list seems to be a subset of the common minimum API discussed here, so [Exposed=*] makes sense to apply to WinterCG environments, and conversely, ShadowRealms created inside of a WinterCG environment should contain all the same APIs as on the web. We agreed to audit the list more fully to confirm these properties.

andreubotella commented 1 year ago

It seems like there are [Exposed=*] interfaces which aren't in the list. In particular: