function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
        var ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
        var token = formattingElementEntry.token;
        var newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
        p._adoptNodes(furthestBlock, newElement);
        p.treeAdapter.appendChild(furthestBlock, newElement);
        p.activeFormattingElements.insertElementAfterBookmark(newElement, formattingElementEntry.token);
        p.activeFormattingElements.removeEntry(formattingElementEntry);
        p.openElements.remove(formattingElementEntry.element);
        p.openElements.insertAfter(furthestBlock, newElement);
    }
//Steps 15-19 of the algorithm
Steps 15-19 of the algorithm
Steps 15 - 19 of the algorithm
function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
        var ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
        var token = formattingElementEntry.token;
        var newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
        p._adoptNodes(furthestBlock, newElement);
        p.treeAdapter.appendChild(furthestBlock, newElement);
        p.activeFormattingElements.insertElementAfterBookmark(newElement, formattingElementEntry.token);
        p.activeFormattingElements.removeEntry(formattingElementEntry);
        p.openElements.remove(formattingElementEntry.element);
        p.openElements.insertAfter(furthestBlock, newElement);
    }
function aaReplaceFormattingElement ( p , furthestBlock , formattingElementEntry ) { var ns = p . treeAdapter . getNamespaceURI ( formattingElementEntry . element ) ; var token = formattingElementEntry . token ; var newElement = p . treeAdapter . createElement ( token . tagName , ns , token . attrs ) ; p . _adoptNodes ( furthestBlock , newElement ) ; p . treeAdapter . appendChild ( furthestBlock , newElement ) ; p . activeFormattingElements . insertElementAfterBookmark ( newElement , formattingElementEntry . token ) ; p . activeFormattingElements . removeEntry ( formattingElementEntry ) ; p . openElements . remove ( formattingElementEntry . element ) ; p . openElements . insertAfter ( furthestBlock , newElement ) ; }
Steps 15-19 of the algorithm
Steps 15 - 19 of the algorithm