[stable14] Set Edge < 16 as incompatible with css vars

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-05-07 18:20:24 +02:00
parent 596a3de6ce
commit 021fcc5011
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -1362,8 +1362,13 @@ function initCore() {
}
// css variables fallback for IE
if (msie > 0 || trident > 0) {
cssVars();
if (msie > 0 || trident > 0 || edge > 0) {
console.debug('Legacy browser detected, applying css vars polyfill')
cssVars({
// set edge < 16 as incompatible
onlyLegacy: !(/Edge\/([0-9]{2})\./i.test(navigator.userAgent)
&& parseInt(/Edge\/([0-9]{2})\./i.exec(navigator.userAgent)[1]) < 16)
});
}
$(window).on('unload.main', function() {