* 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)
| 3301 | * @return {?string} |
| 3302 | */ |
| 3303 | function getDataFromCustomEvent(nativeEvent) { |
| 3304 | var detail = nativeEvent.detail; |
| 3305 | if (typeof detail === 'object' && 'data' in detail) { |
| 3306 | return detail.data; |
| 3307 | } |
| 3308 | return null; |
| 3309 | } |
| 3310 | |
| 3311 | // Track the current IME composition status, if any. |
| 3312 | var isComposing = false; |
no outgoing calls
no test coverage detected