* 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)
| 2596 | * @return {?string} |
| 2597 | */ |
| 2598 | function getDataFromCustomEvent(nativeEvent) { |
| 2599 | var detail = nativeEvent.detail; |
| 2600 | if (typeof detail === 'object' && 'data' in detail) { |
| 2601 | return detail.data; |
| 2602 | } |
| 2603 | return null; |
| 2604 | } |
| 2605 | |
| 2606 | // Track the current IME composition status, if any. |
| 2607 | var isComposing = false; |
no outgoing calls
no test coverage detected