* Checks if the given element's registered action resolves to at least one * existing element by id or a global target (e.g. "AMP"). * @param {!Element} element * @param {string} actionEventType * @param {!Element} targetElement * @param {!Element=} opt_stopAt * @return {boolean}
(
element,
actionEventType,
targetElement,
opt_stopAt
)
| 522 | * @return {boolean} |
| 523 | */ |
| 524 | hasResolvableActionForTarget( |
| 525 | element, |
| 526 | actionEventType, |
| 527 | targetElement, |
| 528 | opt_stopAt |
| 529 | ) { |
| 530 | const action = this.findAction_(element, actionEventType, opt_stopAt); |
| 531 | if (!action) { |
| 532 | return false; |
| 533 | } |
| 534 | return action.actionInfos.some((actionInfo) => { |
| 535 | const {target} = actionInfo; |
| 536 | return this.getActionNode_(target) == targetElement; |
| 537 | }); |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * For global targets e.g. "AMP", returns the document root. Otherwise, |
no test coverage detected