Query Is - ThomasWeinert/FluentDOM GitHub Wiki
FluentDOM\Query is(string $selector);
Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.
$html = <<<HTML
<html>
<head>
<title>Examples: FluentDOM\Query::is()</title>
</head>
<body>
<form><input type="checkbox" /></form>
<div> </div>
</body>
</html>
HTML;
$fdQuery = FluentDOM($html, 'text/html');
var_dump(
$fdQuery
->find('//input[@type = "checkbox"]')
->parent()
->is('name() = "form"')
);
bool(true)