code: function aaObtainFurthestBlock(p, formattingElementEntry) {
      let furthestBlock = null;
  
      for (let i = p.openElements.stackTop; i >= 0; i--) {
          const 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;
  }
docs: Steps 9 and 10 of the algorithm