UNPKG

framer-motion

Version:

An open source and production-ready motion library for React on the web

10 lines (8 loc) • 404 B
const isBrowser = typeof window !== "undefined" // We check for event support via functions in case they've been mocked by a testing suite. export const supportsPointerEvents = () => isBrowser && window.onpointerdown === null export const supportsTouchEvents = () => isBrowser && window.ontouchstart === null export const supportsMouseEvents = () => isBrowser && window.onmousedown === null