* get the window object of an element * @param {HTMLElement} element * @returns {DocumentView|Window}
(element)
| 51737 | |
| 51738 | |
| 51739 | function getWindowForElement(element) { |
| 51740 | var doc = element.ownerDocument || element; |
| 51741 | return doc.defaultView || doc.parentWindow || window; |
| 51742 | } |
| 51743 | |
| 51744 | var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; |
| 51745 | var SUPPORT_TOUCH = 'ontouchstart' in window; |