AMP_DOM_Utils::add_amp_action( DOMElement $element, string $event, string $action )
Description #
Register an AMP action to an event on a given element.
If the element already contains one or more events or actions, the method will assemble them in a smart way.
Parameters #
- $element
-
(Required) Element to add an action to.
- $event
-
(Required) Event to trigger the action on.
- $action
-
(Required) Action to add.