* Requests the element to execute the specified method. If method must have * been previously registered using registerAction, otherwise an * error is thrown. * @param {!./service/action-impl.ActionInvocation} invocation The invocation data. * @param {boolean=} unusedDeferred Whe
(invocation, unusedDeferred)
| 725 | * @return {*} TODO(#23582): Specify return type |
| 726 | */ |
| 727 | executeAction(invocation, unusedDeferred) { |
| 728 | let {method} = invocation; |
| 729 | // If the default action has an alias, the handler will be stored under it. |
| 730 | if (method === DEFAULT_ACTION) { |
| 731 | method = this['defaultActionAlias_'] || method; |
| 732 | } |
| 733 | initActionMap(this); |
| 734 | const holder = this['actionMap_'][method]; |
| 735 | const {tagName} = this.element; |
| 736 | userAssert(holder, `Method not found: ${method} in ${tagName}`); |
| 737 | const {handler, minTrust} = holder; |
| 738 | if (invocation.satisfiesTrust(minTrust)) { |
| 739 | return handler(invocation); |
| 740 | } |
| 741 | } |
| 742 | |
| 743 | /** |
| 744 | * Utility method that forwards the given list of non-bubbling events |
no test coverage detected