mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 00:18:45 +03:00
676 B
676 B
withFeatureCheck():IData`
This method allows us to examine other features beyond navigator.userAgent
. Currently this further improve the detection of the following:
- browser :
- Brave (check for
navigator.isBrave
)
- Brave (check for
- device :
- iPad (check for
navigator.standalone
&navigator.maxTouchPoints
)
- iPad (check for
Code Example
// suppose this code runs on iPad
const withoutFeatureCheck = UAParser();
const withFeatureCheck = UAParser().withFeatureCheck();
console.log(withoutFeatureCheck.device); // { vendor : "Apple", model : "Macintosh", type : undefined }
console.log(withFeatureCheck.device); // { vendor : "Apple", model : "iPad", type : "tablet" }