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

Method registerDefaultAction

src/base-element.js:702–714  ·  view source on GitHub ↗

* Registers the default action for this component. * @param {function(!./service/action-impl.ActionInvocation)} handler * @param {string=} alias * @param {ActionTrust_Enum=} minTrust * @public

(
    handler,
    alias = DEFAULT_ACTION,
    minTrust = ActionTrust_Enum.DEFAULT
  )

Source from the content-addressed store, hash-verified

700 * @public
701 */
702 registerDefaultAction(
703 handler,
704 alias = DEFAULT_ACTION,
705 minTrust = ActionTrust_Enum.DEFAULT
706 ) {
707 devAssert(
708 !this['defaultActionAlias_'],
709 'Default action "%s" already registered.',
710 this['defaultActionAlias_']
711 );
712 this.registerAction(alias, handler, minTrust);
713 this['defaultActionAlias_'] = alias;
714 }
715
716 /**
717 * Requests the element to execute the specified method. If method must have

Callers 9

buildCallbackMethod · 0.80
constructorMethod · 0.80
buildCallbackMethod · 0.80
buildCallbackMethod · 0.80
buildCallbackMethod · 0.80
buildCallbackMethod · 0.80
buildCallbackMethod · 0.80
buildCallbackMethod · 0.80

Calls 2

registerActionMethod · 0.95
devAssertFunction · 0.90

Tested by

no test coverage detected