Skip to content

Commit 6ef9df9

Browse files
committed
Implement in_table_scope
1 parent cff5faa commit 6ef9df9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/wp-includes/html-api/class-wp-html-open-elements.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,19 +288,19 @@ public function has_element_in_button_scope( $tag_name ) {
288288
/**
289289
* Returns whether a particular element is in table scope.
290290
*
291-
* @since 6.4.0
291+
* @since 6.4.0 Stub implementation (throws).
292+
* @since 6.7.0 Full implementation.
292293
*
293294
* @see https://html.spec.whatwg.org/#has-an-element-in-table-scope
294295
*
295-
* @throws WP_HTML_Unsupported_Exception Always until this function is implemented.
296-
*
297296
* @param string $tag_name Name of tag to check.
298297
* @return bool Whether given element is in scope.
299298
*/
300299
public function has_element_in_table_scope( $tag_name ) {
301-
throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on table scope.' );
302-
303-
return false; // The linter requires this unreachable code until the function is implemented and can return.
300+
return $this->has_element_in_specific_scope(
301+
$tag_name,
302+
array( 'HTML', 'TABLE', 'TEMPLATE' )
303+
);
304304
}
305305

306306
/**

0 commit comments

Comments
 (0)