1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Add support of the new Blink-based MS Edge

fixes #311
This commit is contained in:
Denis Demchenko 2019-04-14 13:39:35 +03:00
parent 5c47015b6b
commit d596a43f6b
3 changed files with 55 additions and 0 deletions

View File

@ -303,6 +303,22 @@ const browsersList = [
return browser; return browser;
}, },
}, },
{
test: [/\sedg\//i],
describe(ua) {
const browser = {
name: 'Microsoft Edge',
};
const version = Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
{ {
test: [/edg([ea]|ios)/i], test: [/edg([ea]|ios)/i],
describe(ua) { describe(ua) {

View File

@ -10,7 +10,18 @@ export default [
return parser.getBrowserName(true) === 'microsoft edge'; return parser.getBrowserName(true) === 'microsoft edge';
}, },
describe(ua) { describe(ua) {
const isBlinkBased = /\sedg\//i.test(ua);
// return blink if it's blink-based one
if (isBlinkBased) {
return {
name: 'Blink',
};
}
// otherwise match the version and return EdgeHTML
const version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua); const version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua);
return { return {
name: 'EdgeHTML', name: 'EdgeHTML',
version, version,

View File

@ -1411,6 +1411,34 @@
engine: engine:
name: "EdgeHTML" name: "EdgeHTML"
version: "12.0" version: "12.0"
-
ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.48 Safari/537.36 Edg/74.1.96.24"
spec:
browser:
name: "Microsoft Edge"
version: "74.1.96.24"
os:
name: "Windows"
version: "NT 10.0"
versionName: "10"
platform:
type: "desktop"
engine:
name: "Blink"
-
ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3739.0 Safari/537.36 Edg/75.0.109.0"
spec:
browser:
name: "Microsoft Edge"
version: "75.0.109.0"
os:
name: "Windows"
version: "NT 10.0"
versionName: "10"
platform:
type: "desktop"
engine:
name: "Blink"
Firefox: Firefox:
- -
ua: "Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0" ua: "Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0"