src/Range.php
/**
     * Selects the contents of the given Node.
     *
     * @see https://dom.spec.whatwg.org/#dom-range-selectnodecontents
     *
     * @throws \Rowbot\DOM\Exception\InvalidNodeTypeError
     */
Selects the contents of the given Node.


Selects the contents of the given Node .
public function selectNodeContents(Node $node): void
    {
        if ($node instanceof DocumentType) {
            throw new InvalidNodeTypeError();
        }
        $this->startNode = $node;
        $this->startOffset = 0;
        $this->endNode = $node;
        $this->endOffset = $node->getLength();
    }
public function selectNodeContents ( Node $ node ) : void { if ( $ node instanceof DocumentType ) { throw new InvalidNodeTypeError ( ) ; } $ this -> startNode = $ node ; $ this -> startOffset = 0 ; $ this -> endNode = $ node ; $ this -> endOffset = $ node -> getLength ( ) ; }
Selects the contents of the given Node.
Selects the contents of the given Node .