src/highlight-page.js
function () {
            if (!el) {
                return;
            }

            if (el.nodeType === NODE_TYPE.TEXT_NODE) {
                while (el.nextSibling && el.nextSibling.nodeType === NODE_TYPE.TEXT_NODE) {
                    el.nodeValue += el.nextSibling.nodeValue;
                    el.parentNode.removeChild(el.nextSibling);
                }
            } else {
                dom(el.firstChild).normalizeTextNodes();
            }
            dom(el.nextSibling).normalizeTextNodes();
        }
function () {
            if (!el) {
                return;
            }

            if (el.nodeType === NODE_TYPE.TEXT_NODE) {
                while (el.nextSibling && el.nextSibling.nodeType === NODE_TYPE.TEXT_NODE) {
                    el.nodeValue += el.nextSibling.nodeValue;
                    el.parentNode.removeChild(el.nextSibling);
                }
            } else {
                dom(el.firstChild).normalizeTextNodes();
            }
            dom(el.nextSibling).normalizeTextNodes();
        }
function ( ) { if ( ! el ) { return ; } if ( el . nodeType === NODE_TYPE . TEXT_NODE ) { while ( el . nextSibling && el . nextSibling . nodeType === NODE_TYPE . TEXT_NODE ) { el . nodeValue += el . nextSibling . nodeValue ; el . parentNode . removeChild ( el . nextSibling ) ; } } else { dom ( el . firstChild ) . normalizeTextNodes ( ) ; } dom ( el . nextSibling ) . normalizeTextNodes ( ) ; }
Normalizes text nodes within base element, ie. merges sibling text nodes and assures that every
element node has only one text node.
It should does the same as standard element.normalize, but IE implements it incorrectly.
Normalizes text nodes within base element ie . merges sibling text nodes and assures that every element node has only one text node . It should does the same as standard element . normalize but IE implements it incorrectly .