-
Notifications
You must be signed in to change notification settings - Fork 76
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
IDL/API surface review #51
Comments
Thanks for the review!! Finally getting back to this with #70:
Removed the "Dict" part. I'm afraid that "platform" would be overloaded, as we use it here for OS (and have since split the OS brand from version).
Omitted.
That's indeed silly. Renamed to
Changed the API shape, so not sure this is still relevant
Renamed to
Yeah, apologies for that. I modified the API shape without changing processing along with it. I now revamped it. Let me know what you think on the PR. |
Closing as #70 landed |
In #48 @yoavweiss asked me to do a check on the IDL. Here's a general issue, that mixes in a bit of API review too.
NavigatorUABrandVersionDict
is a bit of a strange name, mainly because it includesDict
. This is not web-exposed so it doesn't really matter, but I'd suggestNavigatorUAPlatform
.required
onNavigatorUABrandVersionDict
'sbrand
doesn't make sense here, since this is only ever returned, not accepted, by Web IDL APIs. Better to just omit that.Why is the array of
NavigatorUABrandVersionDict
s titledbrand
? So you'd access the brand vianavigator.brand[0].brand
? If it's an array, it should have a plural name. And I think a "brand + version" is a "platform" elsewhere, so probably this should beplatforms
?getPlatform()
might be clearer asgetRealPlatform()
or something.navigator.getUserAgent()
should no longer be a function, but instead a readonly attribute, since it's no longer promise-returning or expensive. Which brings up some name collision issues, since the natural name isnavigator.userAgent
... Maybe justself.userAgent
? Tricky.The processing model is totally wrong.
getUserAgent()
is said to return a promise, but it does not in the IDL. The methods and getters are not specced to have appropriate steps for running them; instead they are somehow "initialized" (I guess this means that instead ofnavigator.getUserAgent().getPlatform
being a function, it got overwritten, per the spec, with the platform brand and version string?)The text was updated successfully, but these errors were encountered: