Even the document said "This is the modern, spec-compliant equivalent of DOMParentNode" but in DOMParentNode page there is no new methods like `querySelector()`.
To use this method you have to use new class.
Example:
<?php
$html = <<<EOT
<div class="row">
<div class="col"><h1 id="heading" class="col1-heading">Hello</h1></div>
<div class="col"><p class="paragraph">Hello world.</p>
</div>
EOT;
$doc = \DOM\HTMLDocument::createFromString($html, LIBXML_HTML_NOIMPLIED);
$elem = $doc->querySelector('#heading');
echo $elem->getAttribute('class');?>