Skip to content

WebDeviceInfo 继承自: DeviceInfo

Information derived from navigator.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator

属性 ​

名称类型默认值说明
browser_nameWebBrowserNamerequiredThe name of the browser in use.
app_code_nameOptional[str]NoneThe 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_nameOptional[str]NoneA 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_versionOptional[str]NoneThe 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_memoryOptional[float]NoneThe 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
languageOptional[str]NoneA 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
languagesOptional[list[str]]NoneA 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
platformOptional[str]NoneA 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.
productOptional[str]NoneAlways 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_subOptional[str]NoneThe 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_agentOptional[str]NoneThe 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
vendorOptional[str]NoneThe vendor name of the current browser. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendor
vendor_subOptional[str]NoneReturns 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_pointsOptional[int]NoneThe 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_concurrencyOptional[int]NoneThe number of logical processor cores available. More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency
localeslist[Locale]requiredThe 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.

关注我,学习大模型、大数据、Python等热门技术。