AMP_DOM_Utils::create_node( AmpProjectDomDocument $dom,  string $tag,  string[] $attributes )

Description #

Create a new node w/attributes (a DOMElement) and add to the passed Dom\Document.

Parameters #


(AmpProjectDomDocument) (Required) A representation of an HTML document to add the new node to.


(string) (Required) A valid HTML element tag for the element to be added.


(string[]) (Required) One of more valid attributes for the new node.

Return #

(DOMElement|false) The DOMElement for the given $tag, or false on failure

Changelog #

Version Description
0.2 Introduced.