MCPcopy Create free account
hub / github.com/microsoft/SandDance / getWindowForElement

Function getWindowForElement

docs/app/js/sanddance-app.js:92757–92760  ·  view source on GitHub ↗

* get the window object of an element * @param {HTMLElement} element * @returns {DocumentView|Window}

(element)

Source from the content-addressed store, hash-verified

92755 * @param {HTMLElement} element
92756 * @returns {DocumentView|Window}
92757 */ function getWindowForElement(element) {
92758 var doc = element.ownerDocument || element;
92759 return doc.defaultView || doc.parentWindow || window;
92760 }
92761 var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
92762 var SUPPORT_TOUCH = "ontouchstart" in window;
92763 var SUPPORT_POINTER_EVENTS = prefixed(window, "PointerEvent") !== undefined;

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected