* 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)
| 3266 | * @return {?string} |
| 3267 | */ |
| 3268 | function getDataFromCustomEvent(nativeEvent) { |
| 3269 | var detail = nativeEvent.detail; |
| 3270 | if (typeof detail === 'object' && 'data' in detail) { |
| 3271 | return detail.data; |
| 3272 | } |
| 3273 | return null; |
| 3274 | } |
| 3275 | |
| 3276 | // Track the current IME composition status, if any. |
| 3277 | var isComposing = false; |
no outgoing calls
no test coverage detected