EN: Browser Information
ZH: 返回浏览器信息。
Usage:
const ret = getBrowserInfo();console.log(ret); Copy
const ret = getBrowserInfo();console.log(ret);
Output:
{"engine":"webkit","engineVs":"537.36","platform":"desktop","supporter":"chrome","supporterVs":"85.0.4183.121","system":"windows","systemVs":"10"} Copy
{"engine":"webkit","engineVs":"537.36","platform":"desktop","supporter":"chrome","supporterVs":"85.0.4183.121","system":"windows","systemVs":"10"}
Results:
Example: Determine the environment of the mobile QQ.
const { system, shell } = getBrowserInfo();const isMobileQQ = ['android', 'ios'].includes(system) && ['qq_browser', 'qq_app'].includes(shell); Copy
const { system, shell } = getBrowserInfo();const isMobileQQ = ['android', 'ios'].includes(system) && ['qq_browser', 'qq_app'].includes(shell);
浏览器信息
EN: Browser Information
ZH: 返回浏览器信息。
Usage:
Output:
Results:
Example: Determine the environment of the mobile QQ.