Browse code

Remove old version 5

Benjamin Roth authored on14/03/2021 15:27:00
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-import { window, document } from 'ssr-window';
2
-
3
-const Support = (function Support() {
4
-  return {
5
-    touch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)),
6
-
7
-    pointerEvents: !!window.PointerEvent && ('maxTouchPoints' in window.navigator) && window.navigator.maxTouchPoints >= 0,
8
-
9
-    observer: (function checkObserver() {
10
-      return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
11
-    }()),
12
-
13
-    passiveListener: (function checkPassiveListener() {
14
-      let supportsPassive = false;
15
-      try {
16
-        const opts = Object.defineProperty({}, 'passive', {
17
-          // eslint-disable-next-line
18
-          get() {
19
-            supportsPassive = true;
20
-          },
21
-        });
22
-        window.addEventListener('testPassiveListener', null, opts);
23
-      } catch (e) {
24
-        // No support
25
-      }
26
-      return supportsPassive;
27
-    }()),
28
-
29
-    gestures: (function checkGestures() {
30
-      return 'ongesturestart' in window;
31
-    }()),
32
-  };
33
-}());
34
-
35
-export default Support;
Browse code

Initial commit

Benjamin Roth authored on19/05/2020 21:59:44
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+import { window, document } from 'ssr-window';
2
+
3
+const Support = (function Support() {
4
+  return {
5
+    touch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)),
6
+
7
+    pointerEvents: !!window.PointerEvent && ('maxTouchPoints' in window.navigator) && window.navigator.maxTouchPoints >= 0,
8
+
9
+    observer: (function checkObserver() {
10
+      return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
11
+    }()),
12
+
13
+    passiveListener: (function checkPassiveListener() {
14
+      let supportsPassive = false;
15
+      try {
16
+        const opts = Object.defineProperty({}, 'passive', {
17
+          // eslint-disable-next-line
18
+          get() {
19
+            supportsPassive = true;
20
+          },
21
+        });
22
+        window.addEventListener('testPassiveListener', null, opts);
23
+      } catch (e) {
24
+        // No support
25
+      }
26
+      return supportsPassive;
27
+    }()),
28
+
29
+    gestures: (function checkGestures() {
30
+      return 'ongesturestart' in window;
31
+    }()),
32
+  };
33
+}());
34
+
35
+export default Support;