featureSupport.js 489 B

12345678910111213141516
  1. const featureSupport = (function () {
  2. var ob = {
  3. maskType: true,
  4. svgLumaHidden: true,
  5. offscreenCanvas: typeof OffscreenCanvas !== 'undefined',
  6. };
  7. if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) {
  8. ob.maskType = false;
  9. }
  10. if (/firefox/i.test(navigator.userAgent)) {
  11. ob.svgLumaHidden = false;
  12. }
  13. return ob;
  14. }());
  15. export default featureSupport;