主题
WebDeviceInfo 继承自: DeviceInfo
Information derived from navigator.
More info: https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
browser_name | WebBrowserName | required | The name of the browser in use. |
app_code_name | Optional[str] | None | The internal 'code' name of the current browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appCodeName Note: Do not rely on this property to return the correct value. |
app_name | Optional[str] | None | A string with the official name of the browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appName Note: Do not rely on this property to return the correct value. |
app_version | Optional[str] | None | The version of the browser as a string. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appVersion Note: Do not rely on this property to return the correct value. |
device_memory | Optional[float] | None | The amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory |
language | Optional[str] | None | A string representing the preferred language of the user, usually the language of the browser UI. Will be None if unknown. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language |
languages | Optional[list[str]] | None | A list of strings representing the languages known to the user, by order of preference. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages |
platform | Optional[str] | None | A string representing the platform of the browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform Note: Do not rely on this property to return the correct value. |
product | Optional[str] | None | Always returns "Gecko", on any browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/product Note: Do not rely on this property to return the correct value. This property is kept only for compatibility purposes. |
product_sub | Optional[str] | None | The build number of the current browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/productSub Note: Do not rely on this property to return the correct value. |
user_agent | Optional[str] | None | The user agent string for the current browser (e.g., 'Mozilla/5.0 ...'). More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent |
vendor | Optional[str] | None | The vendor name of the current browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendor |
vendor_sub | Optional[str] | None | Returns the vendor version number (e.g., '6.1'). More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendorSub Note: Do not rely on this property to return the correct value. |
max_touch_points | Optional[int] | None | The maximum number of simultaneous touch contact points supported by the current device. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints |
hardware_concurrency | Optional[int] | None | The number of logical processor cores available. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency |
locales | list[Locale] | required | The full system-reported supported locales of the device. This establishes the language and formatting conventions that application should, if possible, use to render their user interface. The list is ordered in order of priority, with lower-indexed locales being preferred over higher-indexed ones. The first element is the primary locale. The on_locale_change event is called whenever this value changes. |