-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add discussion of unexposed interfaces? #1236
Comments
Report is already exposed in gecko, which was a relief because at one point there was a bug with its toJSON that we needed to patch. It was lucky that we didn’t have this issue in Blink, where it wouldn’t have been similarly addressable. |
Yes.
Because that's the platform convention and matches idiomatic JS.
Either that or do some measurements, yes. This is often needed anyway due to the large variety of existing APIs you might end up clashing with. |
When was that added? MDN BCD doesn't have it and I definitely don't see it in Firefox 107. Maybe Firefox will hit the web compat issues before Chrome?
Ok. Should there perhaps be a non-normative note saying that while in the past it was common to use [NoInterfaceObject], this is discouraged in order to match idiomatic JS? |
Yeah, I think that's reasonable. https://webidl.spec.whatwg.org/#LegacyNoInterfaceObject seems to defer to https://webidl.spec.whatwg.org/#es-interfaces for requirements, but it's only really talking about implementation requirements and not recommendations for specification editors. Perhaps a warning similar to what we have for [LegacyNamespace] is appropriate. |
We exposed |
Apologies, was remembering the particulars of that issue wrong. |
Reading over the definition of Exposed, LegacyNoInterfaceObject and the history in #365 and #350 I'm left quite confused on what WebIDL's position is on interfaces without an ES interface object.
Does WebIDL take the position that all new interfaces should be exposed on at least one global interface? Why? If not, then what's the "non-legacy" way to mark an interface as not being exposed? To what extent should this be discussed somewhere in the WebIDL spec vs. maybe the TAG design principals?
Given that the platform and applications share a global namespace, it seems that there's a tension here. As we add new APIs to the platform we often can't expose new generic property names on
window
because doing so often leads to breaking some websites, such as those which conditionally set global properties they depend on only when its previously undefined. So do we need to use non-generic names for all new interfaces? Or can we avoid worrying about this for interfaces without constructors by just not exposing them?This is coming up now because in blink we're trying to expose the Report interface and needing to do a bunch of web compat analysis to figure out whether or not we can do so safely. What is the cost/benefit tradeoff of exposing interfaces like this one?
The text was updated successfully, but these errors were encountered: