Separate env helpers.
This commit is contained in:
@@ -13,8 +13,6 @@ exports.toInt = function (x) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.isWebKit = 'WebkitAppearance' in document.documentElement.style;
|
||||
|
||||
exports.clone = function (obj) {
|
||||
if (obj === null) {
|
||||
return null;
|
||||
@@ -43,3 +41,9 @@ exports.isEditable = function (el) {
|
||||
d.matches(el, "textarea,[contenteditable]") ||
|
||||
d.matches(el, "button,[contenteditable]");
|
||||
};
|
||||
|
||||
exports.env = {
|
||||
isWebKit: 'WebkitAppearance' in document.documentElement.style,
|
||||
supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),
|
||||
supportsIePointer: window.navigator.msMaxTouchPoints !== null
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user