Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference IDL [Exposed] #312

Closed
leobalter opened this issue May 21, 2021 · 5 comments
Closed

Reference IDL [Exposed] #312

leobalter opened this issue May 21, 2021 · 5 comments

Comments

@leobalter
Copy link
Member

One approach we can take here is to reference IDL [Exposed] as potential properties the host can provide to a realm, and select from those ones which have been adopted by multiple host types. In addition, not allowing access to this will put pressure on TC39 to re-standardize things that are already standard, and used. We already reference external specifications.

Speaking with @annevk, there was a proposal for something like [Exposed=*] to identify truly universal apis, though that hasn't materialized yet.

Originally posted by @codehag in #284 (comment)

@leobalter
Copy link
Member Author

I like this idea, but I need more information on how to do it.

I'm opening this issue to avoid crossed discussions from #284.

@littledan
Copy link
Member

I agree that we should use [Exposed] editorially to expose web APIs to Realms. We will need to do a lot of plumbing in WebIDL to specify how this will actually work. cc @Ms2ger

@erights
Copy link
Collaborator

erights commented May 26, 2021

I want to be explicit that, at this time, I do not agree or disagree. I need to understand this first.

@Ms2ger
Copy link
Collaborator

Ms2ger commented May 27, 2021

Plumbing should be pretty limited; own exposure set would need to be updated to allow a particular value for Realms and exposed should interpret it, and then define the global property references should be called somewhere from the host when creating the Realm. Interfaces that opt in to being exposed in Realms would then need a change like

-[Exposed=(Window,Worker)]
+[Exposed=(Window,Worker,Realm)]
 interface TextDecoder {

@caridy
Copy link
Collaborator

caridy commented Feb 8, 2024

closing this in favor of #398

@caridy caridy closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants