Skip to content

Define WebIDL Global to host targeted APIs targeted for testing #1534 #896

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

Open
dontcallmedom opened this issue Jun 17, 2020 · 1 comment

Comments

@dontcallmedom
Copy link
Contributor

A number of specs have emerged to expose e.g. fake hardware as IDL interfaces to help with testing, e.g.:

Right now, these specs define their interfaces using WebIDL, but without qualifying the interfaces on the global on which they're exposed.

Since these interfaces are typically not exposed in a regular browsing context, I wonder if WebIDL should define a way to qualify these interfaces.

(I mistakenly originally raised this in the context of the WebDriver where some early discussion occurred)

@domenic
Copy link
Member

domenic commented Jun 17, 2020

I think [TestOnly, Exposed=Window] is probably better than a new global (i.e. better than [Exposed=TestOnly]). Because you want to have worker-only test-only interfaces, or window-only test-only interfaces.

Otherwise this seems pretty reasonable.

https://wicg.github.io/webusb/test/#availability has some text we might want to copy into an extended attribute definition. And the normative prose would probably be similar to https://heycam.github.io/webidl/#SecureContext. (Note that that is amenable to being refactored and deduplicated; see #883.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants