MCPcopy Create free account
hub / github.com/Lobos/react-ui / getDataFromCustomEvent

Function getDataFromCustomEvent

docs/lib/react.js:196–202  ·  view source on GitHub ↗

* Google Input Tools provides composition data via a CustomEvent, * with the `data` property populated in the `detail` object. If this * is available on the event object, use it. If not, this is a plain * composition event and we have nothing special to extract. * * @param {object} nativeEvent

(nativeEvent)

Source from the content-addressed store, hash-verified

194 * @return {?string}
195 */
196function getDataFromCustomEvent(nativeEvent) {
197 var detail = nativeEvent.detail;
198 if (typeof detail === 'object' && 'data' in detail) {
199 return detail.data;
200 }
201 return null;
202}
203
204// Track the current IME composition fallback object, if any.
205var currentComposition = null;

Callers 2

extractCompositionEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…