@@ 430-458 (lines=29) @@ | ||
427 | } while (html !== inertBodyElement.innerHTML); |
|
428 | ||
429 | var node = inertBodyElement.firstChild; |
|
430 | while (node) { |
|
431 | switch (node.nodeType) { |
|
432 | case 1: // ELEMENT_NODE |
|
433 | handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes)); |
|
434 | break; |
|
435 | case 3: // TEXT NODE |
|
436 | handler.chars(node.textContent); |
|
437 | break; |
|
438 | } |
|
439 | ||
440 | var nextNode; |
|
441 | if (!(nextNode = node.firstChild)) { |
|
442 | if (node.nodeType === 1) { |
|
443 | handler.end(node.nodeName.toLowerCase()); |
|
444 | } |
|
445 | nextNode = getNonDescendant('nextSibling', node); |
|
446 | if (!nextNode) { |
|
447 | while (nextNode == null) { |
|
448 | node = getNonDescendant('parentNode', node); |
|
449 | if (node === inertBodyElement) break; |
|
450 | nextNode = getNonDescendant('nextSibling', node); |
|
451 | if (node.nodeType === 1) { |
|
452 | handler.end(node.nodeName.toLowerCase()); |
|
453 | } |
|
454 | } |
|
455 | } |
|
456 | } |
|
457 | node = nextNode; |
|
458 | } |
|
459 | ||
460 | while ((node = inertBodyElement.firstChild)) { |
|
461 | inertBodyElement.removeChild(node); |
@@ 380-408 (lines=29) @@ | ||
377 | } while (html !== inertBodyElement.innerHTML); |
|
378 | ||
379 | var node = inertBodyElement.firstChild; |
|
380 | while (node) { |
|
381 | switch (node.nodeType) { |
|
382 | case 1: // ELEMENT_NODE |
|
383 | handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes)); |
|
384 | break; |
|
385 | case 3: // TEXT NODE |
|
386 | handler.chars(node.textContent); |
|
387 | break; |
|
388 | } |
|
389 | ||
390 | var nextNode; |
|
391 | if (!(nextNode = node.firstChild)) { |
|
392 | if (node.nodeType === 1) { |
|
393 | handler.end(node.nodeName.toLowerCase()); |
|
394 | } |
|
395 | nextNode = getNonDescendant('nextSibling', node); |
|
396 | if (!nextNode) { |
|
397 | while (nextNode == null) { |
|
398 | node = getNonDescendant('parentNode', node); |
|
399 | if (node === inertBodyElement) break; |
|
400 | nextNode = getNonDescendant('nextSibling', node); |
|
401 | if (node.nodeType === 1) { |
|
402 | handler.end(node.nodeName.toLowerCase()); |
|
403 | } |
|
404 | } |
|
405 | } |
|
406 | } |
|
407 | node = nextNode; |
|
408 | } |
|
409 | ||
410 | while ((node = inertBodyElement.firstChild)) { |
|
411 | inertBodyElement.removeChild(node); |