Reconstructs the active formatting elements.
Description
This has the effect of reopening all the formatting elements that were opened in the current body, cell, or caption (whichever is youngest) that haven’t been explicitly closed.
See also
Source
*
* @see https://html.spec.whatwg.org/#adjusted-current-node
*
* @since 6.7.0
* @ignore
*
* @return WP_HTML_Token|null The adjusted current node.
*/
private function get_adjusted_current_node(): ?WP_HTML_Token {
if ( isset( $this->context_node ) && 1 === $this->state->stack_of_open_elements->count() ) {
return $this->context_node;
}
return $this->state->stack_of_open_elements->current_node();
}
/**
* Reconstructs the active formatting elements.
*
* > This has the effect of reopening all the formatting elements that were opened
* > in the current body, cell, or caption (whichever is youngest) that haven't
* > been explicitly closed.
*
* @since 6.4.0
* @ignore
*
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
*
* @see https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements
*
Changelog
| Version | Description |
|---|---|
| 6.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.