MCPcopy Create free account
hub / github.com/UI5/webcomponents / fireEvent

Function fireEvent

packages/base/src/UI5Element.ts:1049–1062  ·  view source on GitHub ↗

* * @public * @param name - name of the event * @param data - additional data for the event * @param cancelable - true, if the user can call preventDefault on the event object * @param bubbles - true, if the event bubbles * @returns false, if the event was cancelled (preventDefault calle

(name: string, data?: T, cancelable = false, bubbles = true)

Source from the content-addressed store, hash-verified

1047 * @deprecated use fireDecoratorEvent instead
1048 */
1049 fireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true): boolean {
1050 const eventResult = this._fireEvent(name, data, cancelable, bubbles);
1051 const pascalCaseEventName = kebabToPascalCase(name);
1052
1053 // pascal events are more convinient for native react usage
1054 // live-change:
1055 // Before: onlive-change
1056 // After: onLiveChange
1057 if (pascalCaseEventName !== name) {
1058 return eventResult && this._fireEvent(pascalCaseEventName, data, cancelable, bubbles);
1059 }
1060
1061 return eventResult;
1062 }
1063
1064 /**
1065 * Fires a custom event, configured via the "event" decorator.

Callers

nothing calls this directly

Calls 1

kebabToPascalCaseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…