Return detailed information about the current browser.
Usage:
import { getBrowserInfo } from "mazey";const ret = getBrowserInfo();console.log(ret); Copy
import { getBrowserInfo } from "mazey";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);
Browser information
Browser only.
Return detailed information about the current browser.
Usage:
Output:
Results:
Example: Determine the environment of the mobile QQ.