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

Single promise for getUserAgent? #39

Closed
RByers opened this issue Jan 20, 2020 · 2 comments · Fixed by #48
Closed

Single promise for getUserAgent? #39

RByers opened this issue Jan 20, 2020 · 2 comments · Fixed by #48

Comments

@RByers
Copy link
Member

RByers commented Jan 20, 2020

The proposal suggests this API:

interface mixin NavigatorUA {
  [SecureContext] Promise<NavigatorUAData> getUserAgent();
};

But there's discussion of potentially requiring a user-prompt for some of the more privacy-sensitive bits. Since the privacy model may be very different for, say, the "brand" and the minor version number, don't we need some ability to request some of the information but not others. I.e. perhaps each property should return it's own promise? That also makes it easier to reason about which data is being used by which sites (i.e. measure the compat risk of breaking/freezing just one field).

@yoavweiss
Copy link
Collaborator

I like it! Having the individual getters return Promises (or not) jives with @foolip's comment on #28 (comment). It will enable us to have stricter control on some bits of information but not others, without defining a separate getLowEntropyUserAgentData function.

@yoavweiss
Copy link
Collaborator

Should be closed by #48

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

Successfully merging a pull request may close this issue.

2 participants