-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5dfa24
commit 25a0e85
Showing
5 changed files
with
108 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// WICG Spec: https://wicg.github.io/ua-client-hints | ||
|
||
declare interface Navigator extends NavigatorUA {} | ||
declare interface WorkerNavigator extends NavigatorUA {} | ||
|
||
// https://wicg.github.io/ua-client-hints/#navigatorua | ||
declare interface NavigatorUA { | ||
readonly userAgentData?: NavigatorUAData; | ||
} | ||
|
||
// https://wicg.github.io/ua-client-hints/#dictdef-navigatoruabrandversion | ||
interface NavigatorUABrandVersion { | ||
readonly brand: string; | ||
readonly version: string; | ||
} | ||
|
||
// https://wicg.github.io/ua-client-hints/#dictdef-uadatavalues | ||
interface UADataValues { | ||
readonly brands?: NavigatorUABrandVersion[]; | ||
readonly mobile?: boolean; | ||
readonly platform?: string; | ||
readonly architecture?: string; | ||
readonly bitness?: string; | ||
readonly formFactor?: string[]; | ||
readonly model?: string; | ||
readonly platformVersion?: string; | ||
/** @deprecated in favour of fullVersionList */ | ||
readonly uaFullVersion?: string; | ||
readonly fullVersionList?: NavigatorUABrandVersion[]; | ||
readonly wow64?: boolean; | ||
} | ||
|
||
// https://wicg.github.io/ua-client-hints/#dictdef-ualowentropyjson | ||
interface UALowEntropyJSON { | ||
readonly brands: NavigatorUABrandVersion[]; | ||
readonly mobile: boolean; | ||
readonly platform: string; | ||
} | ||
|
||
// https://wicg.github.io/ua-client-hints/#navigatoruadata | ||
interface NavigatorUAData extends UALowEntropyJSON { | ||
getHighEntropyValues(hints: string[]): Promise<UADataValues>; | ||
toJSON(): UALowEntropyJSON; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters