Blame view

天文台pc/tianwentai-ui/node_modules/dom-helpers/esm/siblings.js 308 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
  import collectSiblings from './collectSiblings';
  /**
   * Collects all previous and next sibling elements of a given element.
   * 
   * @param node the element
   */
  
  export default function siblings(node) {
    return collectSiblings(node && node.parentElement ? node.parentElement.firstElementChild : null, node);
  }