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

Method dispatchCustomEventForTesting

src/custom-element.js:1411–1416  ·  view source on GitHub ↗

* Dispatches a custom event only in testing environment. * * @param {string} name * @param {!Object=} opt_data Event data. * @final

(name, opt_data)

Source from the content-addressed store, hash-verified

1409 * @final
1410 */
1411 dispatchCustomEventForTesting(name, opt_data) {
1412 if (!getMode().test) {
1413 return;
1414 }
1415 dom.dispatchCustomEvent(this, name, opt_data);
1416 }
1417
1418 /**
1419 * Whether the element can pre-render.

Callers 6

completeUpgrade_Method · 0.95
setReadyStateInternalMethod · 0.95
connectedCallbackMethod · 0.95
layoutCallbackMethod · 0.95
unlayoutCallbackMethod · 0.95
reportErrorFunction · 0.80

Calls 1

getModeFunction · 0.90

Tested by

no test coverage detected