WP_HTML_Open_Elements::has_element_in_scope( string $tag_name ): bool

Returns whether a particular element is in scope.

Description

See also

Parameters

$tag_namestringrequired
Name of tag to check.

Return

bool Whether given element is in scope.

Source

 *
 * ## HTML Support
 *
 * This function skips checking for the termination list because there
 * are no supported elements which appear in the termination list.
 *
 * @since 6.4.0
 *
 * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope
 *
 * @param string   $tag_name         Name of tag check.
 * @param string[] $termination_list List of elements that terminate the search.
 * @return bool Whether the element was found in a specific scope.
 */
public function has_element_in_specific_scope( $tag_name, $termination_list ) {

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

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