Blame view

天文台pc/tianwentai-ui/node_modules/dom-helpers/esm/ownerWindow.js 254 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
  import ownerDocument from './ownerDocument';
  /**
   * Returns the owner window of a given element.
   * 
   * @param node the element
   */
  
  export default function ownerWindow(node) {
    var doc = ownerDocument(node);
    return doc && doc.defaultView || window;
  }