UNPKG

infinity-forge

Version:
24 lines 801 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSupport = getSupport; var document_1 = require("../ssr-window/document.js"); var window_1 = require("../ssr-window/window.js"); var support; function calcSupport() { var window = (0, window_1.getWindow)(); var document = (0, document_1.getDocument)(); return { smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style, touch: !!('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch)), }; } function getSupport() { if (!support) { support = calcSupport(); } return support; } //# sourceMappingURL=get-support.js.map