framework7
Version:
Full featured mobile HTML framework for building iOS & Android apps
16 lines • 398 B
JavaScript
import { getWindow, getDocument } from 'ssr-window';
let support;
function calcSupport() {
const window = getWindow();
const document = getDocument();
return {
touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)
};
}
function getSupport() {
if (!support) {
support = calcSupport();
}
return support;
}
export { getSupport };