WP_HTML_Open_Elements::clear_to_table_row_context()

In this article

Clear the stack back to a table row context.

Description

When the steps above require the UA to clear the stack back to a table row context, it means that the UA must, while the current node is not a tr, template, or html element, pop elements from the stack of open elements.

See also

Source

public function clear_to_table_row_context(): void {
	foreach ( $this->walk_up() as $item ) {
		if (
			'TR' === $item->node_name ||
			'TEMPLATE' === $item->node_name ||
			'HTML' === $item->node_name
		) {
			break;
		}
		$this->pop();
	}
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.