function aaObtainFormattingElementEntry(p, token) {
    let 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.tagID)) {
            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) {
    let 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.tagID)) {
            formattingElementEntry = null;
        }
    }
    else {
        genericEndTagInBody(p, token);
    }
    return formattingElementEntry;
}
function aaObtainFormattingElementEntry ( p , token ) { let 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 . tagID ) ) { formattingElementEntry = null ; } } else { genericEndTagInBody ( p , token ) ; } return formattingElementEntry ; }
Steps 5-8 of the algorithm
Steps 5 - 8 of the algorithm