How to use the modernizr._domPrefixes function in modernizr

To help you get started, we’ve selected a few modernizr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jplusplus / the-accountant / src / modernizr.js View on Github external
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;
    });
  }
github jplusplus / the-accountant / src / modernizr.js View on Github external
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;
    });
  }