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

Function getWindowForElement

docs/tests/v2/es6/js/sanddance.js:51739–51742  ·  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

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;

Callers 1

sanddance.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected