AMP_DOM_Utils
Description #
Class AMP_DOM_Utils
Functionality to simplify working with Dom\Documents and DOMElements.
Source #
Methods #
- add_amp_action — Register an AMP action to an event on a given element.
- add_attributes_to_node — Add one or more HTML element attributes to a node's DOMElement.
- copy_attributes — Copy one or more attributes from one element to the other.
- create_node — Create a new node w/attributes (a DOMElement) and add to the passed Dom\Document.
- get_amp_bind_placeholder_prefix — Get attribute prefix for converted amp-bind attributes. — deprecated
- get_content_from_dom — Return valid HTML *body* content extracted from the Dom\Document passed as a parameter.
- get_content_from_dom_node — Return valid HTML content extracted from the DOMNode passed as a parameter. — deprecated
- get_dom — Return a valid Dom\Document representing HTML document passed as a parameter. — deprecated
- get_dom_from_content — Return a valid Dom\Document representing arbitrary HTML content passed as a parameter.
- get_element_id — Get the ID for an element. — deprecated
- get_node_attributes_as_assoc_array — Extract a DOMElement node's HTML element attributes and return as an array.
- has_class — Check whether a given element has a specific class.
- is_node_empty — Determines if a DOMElement's node is empty or not.
- is_valid_head_node — Determine whether a node can be in the head. — deprecated
- merge_amp_actions — Merge two sets of AMP events & actions.