Files
CurrStatVDP/Diagram-Canvas/packages/popper.js.1.16.1/content/Scripts/src/utils/getWindow.js
2021-05-18 01:02:10 +05:00

10 lines
261 B
JavaScript

/**
* Get the window associated with the element
* @argument {Element} element
* @returns {Window}
*/
export default function getWindow(element) {
const ownerDocument = element.ownerDocument;
return ownerDocument ? ownerDocument.defaultView : window;
}