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

Function attachConfigChange

packages/base/src/config/ConfigurationSync.ts:34–40  ·  view source on GitHub ↗
(name: string, handler: (value: any) => void)

Source from the content-addressed store, hash-verified

32 * The handler is only called when another runtime fires the change.
33 */
34const attachConfigChange = (name: string, handler: (value: any) => void): void => { // eslint-disable-line
35 getEventProvider().attachEvent(CONFIG_CHANGE, (detail: ConfigChangeDetail) => {
36 if (detail.name === name && !skipFlags.has(name)) {
37 handler(detail.value);
38 }
39 });
40};
41
42/**
43 * Reads the last-set value from the shared values map.

Callers 3

Language.tsFile · 0.85
Theme.tsFile · 0.85

Calls 3

handlerFunction · 0.85
attachEventMethod · 0.80
getEventProviderFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…