(node)
| 1412 | } |
| 1413 | |
| 1414 | function walkDiscardedChildNodes(node) { |
| 1415 | if (node.nodeType === 1) { |
| 1416 | var curChild = node.firstChild; |
| 1417 | while(curChild) { |
| 1418 | |
| 1419 | |
| 1420 | if (!curChild.id) { |
| 1421 | // We only want to handle nodes that don't have an ID to avoid double |
| 1422 | // walking the same saved element. |
| 1423 | |
| 1424 | onNodeDiscarded(curChild); |
| 1425 | |
| 1426 | // Walk recursively |
| 1427 | walkDiscardedChildNodes(curChild); |
| 1428 | } |
| 1429 | |
| 1430 | curChild = curChild.nextSibling; |
| 1431 | } |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | function removeNode(node, parentNode, alreadyVisited) { |
| 1436 | parentNode.removeChild(node); |
no outgoing calls
no test coverage detected