(node: Node)
| 61 | * clobbering of the `nextSibling` property happening. |
| 62 | */ |
| 63 | export function getNextSibling(node: Node): Node | null { |
| 64 | const nextSibling = node.nextSibling; |
| 65 | // Make sure there is no `nextSibling` clobbering: navigating to |
| 66 | // the next sibling and going back to the previous one should result |
| 67 | // in the original node. |
| 68 | if (nextSibling && node !== nextSibling.previousSibling) { |
| 69 | throw clobberedElementError(nextSibling); |
| 70 | } |
| 71 | return nextSibling; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Retrieves first child node and makes sure that there is no |
no test coverage detected