-
Notifications
You must be signed in to change notification settings - Fork 197
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
Define WebIDL Global to host WebDriver targeted APIs #1534
Comments
I think that Web IDL is not an ideal fit for this, but that we're lacking a good spec formalism that could be used instead. Shameless plug for #1510 and w3c/webdriver-bidi#21. Web IDL converts between ECMAScript values and "IDL values", which are the implementation-internal types. For WebDriver, the conversion is rather between a JSON serialization and some internal types. The difference sounds trivial/pedantic, but when there isn't actually a JS engine involved at all, none of the bindings-generating code that implementations have for Web IDL would be involved. And while one can squint and make it work for simple dictionaries of strings and numbers, I think it'll stop working when we sort out w3c/webdriver-bidi#16, and have a way to serialize values other than the subset of JS that can be represented as JSON. Note that https://webbluetoothcg.github.io/web-bluetooth/tests.html is different, that's not defining a WebDriver API, but rather a test-only API which would be exposed in JavaScript like regular web APIs, just only in testing setups. There I think something like |
Frequent Web IDL contributors @Ms2ger @domenic @TimothyGu @annevk @yasskin may have opinions about this. |
WebUSB seems similar to WebBluetooth, in that https://wicg.github.io/webusb/test/#idl-index exposes a Actually, the same for WebXR. I think none of the specs listed in the OP have much to do with WebDriver. |
huh, sorry, I guess I was confused :) So should I bring this over to the WebIDL repo then? |
Yeah, that's probably the right place for it, although we'll want a combination of Web IDL domain experts and test-only API domain experts. |
Raised whatwg/webidl#896 so closing this here |
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 WebDriver should define a dedicated global on which these interfaces could be exposed (e.g. with
[Exposed=WebDriverGlobal]
or[Exposed=TestGlobal]
.)The text was updated successfully, but these errors were encountered: