MCPcopy
hub / github.com/ampproject/amphtml / enqueAction

Method enqueAction

src/custom-element.js:1828–1840  ·  view source on GitHub ↗

* Enqueues the action with the element. If element has been upgraded and * built, the action is dispatched to the implementation right away. * Otherwise the invocation is enqueued until the implementation is ready * to receive actions. * @param {!./service/action-impl.ActionInvoc

(invocation)

Source from the content-addressed store, hash-verified

1826 * @final
1827 */
1828 enqueAction(invocation) {
1829 assertNotTemplate(this);
1830 if (!this.isBuilt()) {
1831 if (this.actionQueue_ === undefined) {
1832 this.actionQueue_ = [];
1833 }
1834 devAssert(this.actionQueue_).push(invocation);
1835 // Schedule build sooner.
1836 this.build();
1837 } else {
1838 this.executionAction_(invocation, false);
1839 }
1840 }
1841
1842 /**
1843 * Dequeues events from the queue and dispatches them to the implementation

Calls 6

isBuiltMethod · 0.95
buildMethod · 0.95
executionAction_Method · 0.95
devAssertFunction · 0.90
assertNotTemplateFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected