function aaObtainFurthestBlock(p, formattingElementEntry) {
        var furthestBlock = null;
        for (var i = p.openElements.stackTop; i >= 0; i--) {
            var element = p.openElements.items[i];
            if (element === formattingElementEntry.element) {
                break;
            }
            if (p._isSpecialElement(element)) {
                furthestBlock = element;
            }
        }
        if (!furthestBlock) {
            p.openElements.popUntilElementPopped(formattingElementEntry.element);
            p.activeFormattingElements.removeEntry(formattingElementEntry);
        }
        return furthestBlock;
    }
//Steps 9 and 10 of the algorithm
Steps 9 and 10 of the algorithm
Steps 9 and 10 of the algorithm
function aaObtainFurthestBlock(p, formattingElementEntry) {
        var furthestBlock = null;
        for (var i = p.openElements.stackTop; i >= 0; i--) {
            var element = p.openElements.items[i];
            if (element === formattingElementEntry.element) {
                break;
            }
            if (p._isSpecialElement(element)) {
                furthestBlock = element;
            }
        }
        if (!furthestBlock) {
            p.openElements.popUntilElementPopped(formattingElementEntry.element);
            p.activeFormattingElements.removeEntry(formattingElementEntry);
        }
        return furthestBlock;
    }
function aaObtainFurthestBlock ( p , formattingElementEntry ) { var furthestBlock = null ; for ( var i = p . openElements . stackTop ; i >= 0 ; i -- ) { var element = p . openElements . items [ i ] ; if ( element === formattingElementEntry . element ) { break ; } if ( p . _isSpecialElement ( element ) ) { furthestBlock = element ; } } if ( ! furthestBlock ) { p . openElements . popUntilElementPopped ( formattingElementEntry . element ) ; p . activeFormattingElements . removeEntry ( formattingElementEntry ) ; } return furthestBlock ; }
Steps 9 and 10 of the algorithm
Steps 9 and 10 of the algorithm