MCPcopy Index your code
hub / github.com/ampproject/amphtml / registerAction

Method registerAction

src/base-element.js:690–693  ·  view source on GitHub ↗

* Registers the action handler for the method with the specified name. * * The handler is only invoked by events with trust equal to or greater than * `minTrust`. Otherwise, a user error is logged. * * @param {string} alias * @param {function(!./service/action-impl.ActionInvocation

(alias, handler, minTrust = ActionTrust_Enum.DEFAULT)

Source from the content-addressed store, hash-verified

688 * @public
689 */
690 registerAction(alias, handler, minTrust = ActionTrust_Enum.DEFAULT) {
691 initActionMap(this);
692 this['actionMap_'][alias] = {handler, minTrust};
693 }
694
695 /**
696 * Registers the default action for this component.

Callers 15

registerDefaultActionMethod · 0.95
setupActions_Method · 0.45
buildCallbackMethod · 0.45
buildCallbackMethod · 0.45
constructorMethod · 0.45
buildCallbackMethod · 0.45
initializeActions_Method · 0.45
initializeActions_Method · 0.45
buildCallbackMethod · 0.45
buildCallbackMethod · 0.45
buildCallbackMethod · 0.45

Calls 1

initActionMapFunction · 0.85

Tested by

no test coverage detected