fast-animations
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "fast-animations", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"module": "src/index.ts", | ||
"peerDependencies": { | ||
@@ -8,0 +7,0 @@ "react": "*" |
@@ -0,4 +1,8 @@ | ||
const hasDom = !!(typeof window !== 'undefined' && | ||
window.document && | ||
window.document.createElement); | ||
export const capabilities = { | ||
workletSupported: !!window && ('animationWorklet' in CSS), | ||
waapiSupported: !!window && ('animate' in document.createElement('div')) | ||
workletSupported: hasDom && ('animationWorklet' in CSS), | ||
waapiSupported: hasDom && ('animate' in document.createElement('div')) | ||
}; |
30340
600