NavigatorUAData

interface

interface NavigatorUAData

Gives access to information about the runtime's user agent, exposed via Navigator.userAgentData. This is the User-Agent Client Hints API.

variable

var NavigatorUAData: { … }

Constructor for NavigatorUAData objects.

Note: This constructor cannot be used to create new NavigatorUAData instances in Ende.

Constructors

constructor

new NavigatorUAData(): never

Properties

brands

readonly brands: NavigatorUABrandVersion[]

A list of the runtime's brand and major version.

mobile

readonly mobile: boolean

Whether the runtime reports itself as a mobile device. Always false in Ende.

platform

readonly platform: string

The platform the runtime is running on (e.g. "Linux", "macOS", "Windows").

prototype

readonly prototype: NavigatorUAData

Methods

getHighEntropyValues

getHighEntropyValues(hints: string[]): Promise<UADataValues>

Resolves with the requested high-entropy values. Unrecognized hints are ignored. The low-entropy values (brands, mobile, platform) are always included.

toJSON

toJSON(): UALowEntropyJSON

Returns a JSON representation of the low-entropy values.