Skip to content
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 getters for read-only attributes (Was: interface NavigatorUAData should be a dictionary) #19

Closed
domenic opened this issue Jan 14, 2020 · 4 comments
Labels

Comments

@domenic
Copy link
Collaborator

domenic commented Jan 14, 2020

As this is not a class with a useful constructor, data, and behavior packaged together, but instead a simple holder for data, it would be better as a dictionary.

@domenic
Copy link
Collaborator Author

domenic commented Jan 14, 2020

This would also solve the problem where the getter algorithms for each field of NavigatorUAData are not defined, and instead https://wicg.github.io/ua-client-hints/#dom-navigatorua-getuseragent somehow sets the value of readonly getter fields.

@yoavweiss
Copy link
Collaborator

We've reached the conclusion that it might be better off to remove the Promise from getUserAgent()'s return value, and add it on single attributes. I believe that design is not possible with a dictionary, so we would need to properly define the getters.

@yoavweiss
Copy link
Collaborator

#48 is the PR in which we're moving the promises.
There may be work left after it though (e.g. explicitly setting the getters on the read only attributes)

@yoavweiss yoavweiss changed the title interface NavigatorUAData should be a dictionary Define getters for read-only attributes (Was: interface NavigatorUAData should be a dictionary) Jan 27, 2020
@yoavweiss
Copy link
Collaborator

I believe this was addressed by #70.

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

No branches or pull requests

2 participants