MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / trigger

Method trigger

src/monogatari.ts:2320–2330  ·  view source on GitHub ↗

* @static trigger - Trigger a custom element with custom details data * * @param {string} name - The name of the event to trigger * @param {Object} [details = {}] - A key/value object with additional details * for the event * * @returns {void}

(name: string, details: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

2318 * @returns {void}
2319 */
2320 static trigger (name: string, details: Record<string, unknown> = {}) {
2321 const event = new CustomEvent (name, { bubbles: false, detail: details });
2322
2323 const element = this.element (true, true);
2324
2325 if (element) {
2326 element.dispatchEvent (event);
2327 } else {
2328 $_ready (() => dispatchEvent (event));
2329 }
2330 }
2331
2332 static displayInitialScreen (): void {
2333 return _displayInitialScreen(this.asEngine());

Callers 13

stateMethod · 0.95
configurationMethod · 0.95
preloadMethod · 0.95
onSuccessMethod · 0.95
_setupRegistryMethod · 0.95
initMethod · 0.95
initiateMethod · 0.80
setContentMethod · 0.80
loadFromSlotFunction · 0.80
revertFunction · 0.80
runFunction · 0.80
localizeFunction · 0.80

Calls 1

elementMethod · 0.95

Tested by

no test coverage detected