MCPcopy Index your code
hub / github.com/framework7io/framework7 / emit

Function emit

src/react/shared/utils.js:108–123  ·  view source on GitHub ↗
(props, events, ...args)

Source from the content-addressed store, hash-verified

106}
107
108export function emit(props, events, ...args) {
109 if (!events || !events.trim().length || typeof events !== 'string') return;
110
111 events
112 .trim()
113 .split(' ')
114 .forEach((event) => {
115 let eventName = (event || '').trim();
116 if (!eventName) return;
117 eventName = eventName.charAt(0).toUpperCase() + eventName.slice(1);
118
119 const propName = `on${eventName}`;
120
121 if (props[propName]) props[propName](...args);
122 });
123}
124
125export function getExtraAttrs(props = {}) {
126 const extraAttrs = {};

Callers 15

onClickFunction · 0.90
onNameClickFunction · 0.90
onTextClickFunction · 0.90
onAvatarClickFunction · 0.90
onHeaderClickFunction · 0.90
onFooterClickFunction · 0.90
onBubbleClickFunction · 0.90
onBeforeOpenFunction · 0.90
onOpenFunction · 0.90
onOpenedFunction · 0.90
onCloseFunction · 0.90
onClosedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected