src/Document.php
/**
     * Creates a new CDATA Section node, with data as its data.
     *
     * @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
     *
     * @throws \Rowbot\DOM\Exception\InvalidCharacterError
     * @throws \Rowbot\DOM\Exception\NotSupportedError
     */
Creates a new CDATA Section node, with data as its data.


Creates a new CDATA Section node with data as its data .
public function createCDATASection(string $data): CDATASection
    {
        if ($this instanceof HTMLDocument) {
            throw new NotSupportedError();
        }
        if (mb_strpos($data, ']]>', 0, 'utf-8') !== false) {
            throw new InvalidCharacterError();
        }
        $node = new CDATASection($this, $data);
        return $node;
    }
public function createCDATASection ( string $ data ) : CDATASection { if ( $ this instanceof HTMLDocument ) { throw new NotSupportedError ( ) ; } if ( mb_strpos ( $ data , ']]>' , 0 , 'utf-8' ) !== false ) { throw new InvalidCharacterError ( ) ; } $ node = new CDATASection ( $ this , $ data ) ; return $ node ; }
Creates a new CDATA Section node, with data as its data.
Creates a new CDATA Section node with data as its data .
// If context object is an HTML document, then throw a // NotSupportedError. // If data contains the string "]]>", then throw an // InvalidCharacterError. // Return a new CDATASection node with its data set to data and node // document set to the context object.