AMP_DOM_Utils::create_node

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 #

$dom

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

$tag

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

$attributes

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


Return #

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


Changelog #

Changelog
Version Description
0.2 Introduced.