-
Notifications
You must be signed in to change notification settings - Fork 2k
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
What does basic support for a no-constructor or non-exposed interface mean? #3528
Comments
Is this another argument for removing basic support? My inner windshield is fogging over just reading that. |
I don't have enough experience with the breadth of data in BCD to have an opinion about that, but if removed one would be left with some interfaces that have no own methods and no constructor, like https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknownElement. One could add "interface object exposed" to always have something, but I fear that information is meaningless in many cases, PerformanceEntry being a good example. |
You should probably copy that comment to the basic support discussion. |
window.navigator is a property and installed as "api.Window.navigator" in BCD it returns an object which is navigator and that is installed as "api.Navigator" in BCD. What can happen here? Well, the property could be prefixed. So, the compat data "api.Window.navigator.__compat" should say that it is "window.weirdNavigator" instead. Further, the object that is returned by this property could also appear as "weirdNavigator", so that would need to be reflected in "api.Navigator.__compat". I guess this has happened in the webplatform, but if this has never happened, I could imagine to not have "api.Navigator.__compat", but only "api.Navigator.property", "api.Navigator.method", etc. So, that we only describe members of this not directly exposed interface and not the interface itself. Would this make sense? I think "
Ugh, this sounds like a super confusing situation to me and I'm not sure I follow what you're saying. I might need to dig deeper into the Performance APIs to understand the context here.
Yes. so if the object wasn't "webkitPerformanceEntry" then I think "prefix" is wrong in PerformanceEntry.json. If the property "performance.webkitGetEntries" was there, then this would be in Performance.json where the property "getEntries" has the prefix.
It sounds like this won't be useful to anyone. Maybe dealing with more data will tell.
yeah, so this is currently "api.HTMLUnknownElement.__compat" and basically means "interface object exposed" (and exposed per standard way, or behind pref, or with prefix, etc).
Again, maybe, we could omit "api.PerformanceEntry.__compat" and only have "api.PerformanceEntry.toJSON" and friends for these types of interfaces that aren't directly exposed and we don't care under which name they appear. |
@vinyldarkscratch FYI this is a question that you may run into as well. Ideas? |
@Elchi3 funny enough, I didn't give a good example of "non-exposed interface" in the issue. In this case, I would argue that |
There was a real case in #3658 (comment). There I argued that the non-exposed interface should be marked as supported, but with a note that the interface objected isn't exposed. |
I'm closing this stalled issue. I think we found a handle on this topic. Feel free to re-open if this still present a problem. |
Many interfaces have no constructor and instances can only be created by the browser itself, from trivial to complicated:
Navigator
:window.navigator
is the way to get an objectSelection
:document.getSelection()
and some other APIs return instancesPerformanceEntry
:performance.getEntries()
returns an array of instances of some inheriting interface, likePerformanceResourceTiming
Historically many interface objects for interfaces like these haven't been exposed, or not exposed at the same time as the related API. For example,
performance.webkitGetEntries()
was added inChrome 25,
performance.getEntries()
was added in Chrome 28, but thePerformanceEntry
interface object was only exposed in Chrome 29. What then, should the basic support statement for this interface in Chrome be? Two separate concerns:prefix
in a few places but this is not really right.The text was updated successfully, but these errors were encountered: