-
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Currently parsedUserAgent.browser.major is incorrect for Edge - it reports parsedUserAgent.engine.major instead. I.E. Edge 41 incorrectly reports a parsedUserAgent.browser.major of 16 - this is the EdgeHTML version but not the browser version.
I'm currently working around this with something like:
var EDGEHTML_VS_EDGE_VERSIONS = { 12: 0.1, 13: 21, 14: 31, 15: 39, 16: 41 }; var browserMajorVersion = parsedUserAgent.browser.major; if ( browserName === 'Edge' ) { browserMajorVersion = EDGEHTML_VS_EDGE_VERSIONS[browserMajorVersion] } It would be cool if UA Parser JS did something similar. It's a breaking change though so should be in a major new version.
callaginn, pdcmoreira and faisalman