Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function addTest() {
// Try using window.CSS.supports
if ('CSS' in $window && 'supports' in $window.CSS) {
for (let i = 0; i < Modernizr._prefixes.length; i++) {
prop = `${Modernizr._prefixes[i]}clip-path`;
if ($window.CSS.supports(prop, value)) {
return true;
}
}
return false;
}
const properties = Modernizr._prefixes.join(`clip-path: ${value};`);
// Otherwise, use Modernizr.testStyles and examine the property manually
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++) {
function addTest() {
// Try using window.CSS.supports
if ('CSS' in $window && 'supports' in $window.CSS) {
for (let i = 0; i < Modernizr._prefixes.length; i++) {
prop = `${Modernizr._prefixes[i]}clip-path`;
if ($window.CSS.supports(prop, value)) {
return true;
}
}
return false;
}
const properties = Modernizr._prefixes.join(`clip-path: ${value};`);
// Otherwise, use Modernizr.testStyles and examine the property manually
return Modernizr.testStyles(`#modernizr { ${properties} }`, elem => {
const style = getComputedStyle(elem);
let clip = style.clipPath;
if (!clip || clip === "none") {
clip = false;