MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / getDataFromCustomEvent

Function getDataFromCustomEvent

code/composition/public/app.js:3406–3412  ·  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

3404 * @return {?string}
3405 */
3406function getDataFromCustomEvent(nativeEvent) {
3407 var detail = nativeEvent.detail;
3408 if (typeof detail === 'object' && 'data' in detail) {
3409 return detail.data;
3410 }
3411 return null;
3412}
3413
3414// Track the current IME composition status, if any.
3415var isComposing = false;

Callers 2

extractCompositionEventFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected