Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Modernizr.testStyles(`#modernizr { ${properties} }`, elem => {
const style = getComputedStyle(elem);
let clip = style.clipPath;
if (!clip || clip === "none") {
clip = false;
for (let i = 0; i < Modernizr._domPrefixes.length; i++) {
const test = `${Modernizr._domPrefixes[i]}ClipPath`;
if (style[test] && style[test] !== "none") {
clip = true;
break;
}
}
}
return Modernizr.testProp('clipPath') && clip;
});
}
return Modernizr.testStyles(`#modernizr { ${properties} }`, elem => {
const style = getComputedStyle(elem);
let clip = style.clipPath;
if (!clip || clip === "none") {
clip = false;
for (let i = 0; i < Modernizr._domPrefixes.length; i++) {
const test = `${Modernizr._domPrefixes[i]}ClipPath`;
if (style[test] && style[test] !== "none") {
clip = true;
break;
}
}
}
return Modernizr.testProp('clipPath') && clip;
});
}