MCPcopy Create free account
hub / github.com/microsoft/SandDance / getDataFromCustomEvent

Function getDataFromCustomEvent

docs/external/js/react-dom.development.js:8884–8892  ·  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} na

(nativeEvent)

Source from the content-addressed store, hash-verified

8882
8883
8884 function getDataFromCustomEvent(nativeEvent) {
8885 var detail = nativeEvent.detail;
8886
8887 if (typeof detail === 'object' && 'data' in detail) {
8888 return detail.data;
8889 }
8890
8891 return null;
8892 }
8893 /**
8894 * Check if a composition event was triggered by Korean IME.
8895 * Our fallback mode does not work well with IE's Korean IME,

Callers 2

extractCompositionEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected