* Skips the remaining sibling nodes in the current parent. Returns the next node in document order. * @return {?Node}
()
| 1852 | * @return {?Node} |
| 1853 | */ |
| 1854 | skipSubtree() { |
| 1855 | if (this.useQuerySelector_) { |
| 1856 | const {currentNode} = this; |
| 1857 | let next = null; |
| 1858 | do { |
| 1859 | next = this.nextNode(); |
| 1860 | } while (next !== null && currentNode.contains(next)); |
| 1861 | return next; |
| 1862 | } |
| 1863 | |
| 1864 | const walker = this.treeWalker_; |
| 1865 | for (let n = walker.currentNode; n; n = walker.parentNode()) { |
| 1866 | const sibling = walker.nextSibling(); |
| 1867 | if (sibling !== null) { |
| 1868 | this.currentNode = sibling; |
| 1869 | return sibling; |
| 1870 | } |
| 1871 | } |
| 1872 | return null; |
| 1873 | } |
| 1874 | } |
no test coverage detected