-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Commit
The Microsoft Edge user agent contains "Chrome" so it needs to be checked before Chrome.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,15 +51,13 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec | |
var expected, | ||
userAgent = window.navigator.userAgent; | ||
|
||
if ( /chrome/i.test( userAgent ) ) { | ||
// Catches Chrome on Android as well (i.e. the default | ||
// Android browser on Android >= 4.4). | ||
if ( /edge\/12/i.test( userAgent ) ) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mgol
Author
Member
|
||
expected = { | ||
"ajax": true, | ||
"boxSizingReliable": true, | ||
"checkClone": true, | ||
"checkOn": true, | ||
"clearCloneStyle": true, | ||
"clearCloneStyle": false, | ||
"cors": true, | ||
"createHTMLDocument": true, | ||
"focusin": false, | ||
|
@@ -107,6 +105,26 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec | |
"radioValue": false, | ||
"reliableMarginRight": true | ||
}; | ||
} else if ( /chrome/i.test( userAgent ) ) { | ||
// Catches Chrome on Android as well (i.e. the default | ||
// Android browser on Android >= 4.4). | ||
expected = { | ||
"ajax": true, | ||
"boxSizingReliable": true, | ||
"checkClone": true, | ||
"checkOn": true, | ||
"clearCloneStyle": true, | ||
"cors": true, | ||
"createHTMLDocument": true, | ||
"focusin": false, | ||
"noCloneChecked": true, | ||
"optDisabled": true, | ||
"optSelected": true, | ||
"pixelMarginRight": true, | ||
"pixelPosition": true, | ||
"radioValue": true, | ||
"reliableMarginRight": true | ||
}; | ||
} else if ( /8\.0(\.\d+|) safari/i.test( userAgent ) ) { | ||
expected = { | ||
"ajax": true, | ||
|
The 12 number will change. Why not leave this just looking for Edge?