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

Move Promises to guard only the high-entropy bits #48

Merged
merged 2 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ accomplish this as follows:

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

Navigator includes NavigatorUA;
Expand All @@ -149,9 +149,9 @@ accomplish this as follows:
interface NavigatorUAData {
readonly attribute FrozenArray<NavigatorUABrandVersionDict> brand; // [ { brand: "Chrome", version: "69" } ]
readonly attribute boolean mobile; // false
readonly attribute NavigatorUABrandVersionDict platform; // { brand: "Win", version: "10" }
readonly attribute DOMString architecture; // "ARM64"
readonly attribute DOMString model; // ""
Promise<NavigatorUABrandVersionDict> getPlatform(); // { brand: "Win", version: "10" }
Promise<DOMString> getArchitecture(); // "ARM64"
Promise<DOMString> model(); // ""
};
```

Expand Down
14 changes: 7 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ dictionary NavigatorUABrandVersionDict {
interface NavigatorUAData {
readonly attribute FrozenArray&lt;NavigatorUABrandVersionDict&gt; brand;
readonly attribute boolean mobile;
readonly attribute NavigatorUABrandVersionDict platform;
readonly attribute DOMString architecture;
readonly attribute DOMString model;
Promise&lt;NavigatorUABrandVersionDict&gt; getPlatform();
Promise&lt;DOMString&gt; getArchitecture();
Promise&lt;DOMString&gt; getModel();
};

interface mixin NavigatorUA {
[SecureContext] Promise&lt;NavigatorUAData&gt; getUserAgent();
[SecureContext] NavigatorUAData getUserAgent();
};
Navigator includes NavigatorUA;

Expand All @@ -337,11 +337,11 @@ Processing model {#processing}

: {{NavigatorUAData/brand}}
:: The user agent's [=user agent/brand=].
: {{NavigatorUAData/platform}}
: {{NavigatorUAData/getPlatform}}
:: The user agent's [=user agent/platform brand and version=].
: {{NavigatorUAData/architecture}}
: {{NavigatorUAData/getArchitecture}}
:: The user agent's [=user agent/platform architecture=].
: {{NavigatorUAData/model}}
: {{NavigatorUAData/getModel}}
:: The user agent's [=user agent/model=].
: {{NavigatorUAData/mobile}}
:: The user agent's [=user agent/mobileness=].
Expand Down