function aaObtainFormattingElementEntry(p, token) {
        var formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
        if (formattingElementEntry) {
            if (!p.openElements.contains(formattingElementEntry.element)) {
                p.activeFormattingElements.removeEntry(formattingElementEntry);
                formattingElementEntry = null;
            }
            else if (!p.openElements.hasInScope(token.tagName)) {
                formattingElementEntry = null;
            }
        }
        else {
            genericEndTagInBody(p, token);
        }
        return formattingElementEntry;
    }
//Steps 5-8 of the algorithm
Steps 5-8 of the algorithm
Steps 5 - 8 of the algorithm
function aaObtainFormattingElementEntry(p, token) {
        var formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
        if (formattingElementEntry) {
            if (!p.openElements.contains(formattingElementEntry.element)) {
                p.activeFormattingElements.removeEntry(formattingElementEntry);
                formattingElementEntry = null;
            }
            else if (!p.openElements.hasInScope(token.tagName)) {
                formattingElementEntry = null;
            }
        }
        else {
            genericEndTagInBody(p, token);
        }
        return formattingElementEntry;
    }
function aaObtainFormattingElementEntry ( p , token ) { var formattingElementEntry = p . activeFormattingElements . getElementEntryInScopeWithTagName ( token . tagName ) ; if ( formattingElementEntry ) { if ( ! p . openElements . contains ( formattingElementEntry . element ) ) { p . activeFormattingElements . removeEntry ( formattingElementEntry ) ; formattingElementEntry = null ; } else if ( ! p . openElements . hasInScope ( token . tagName ) ) { formattingElementEntry = null ; } } else { genericEndTagInBody ( p , token ) ; } return formattingElementEntry ; }
Steps 5-8 of the algorithm
Steps 5 - 8 of the algorithm