* 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)
| 247 | * @return {?string} |
| 248 | */ |
| 249 | function getDataFromCustomEvent(nativeEvent) { |
| 250 | var detail = nativeEvent.detail; |
| 251 | if (typeof detail === 'object' && 'data' in detail) { |
| 252 | return detail.data; |
| 253 | } |
| 254 | return null; |
| 255 | } |
| 256 | |
| 257 | // Track the current IME composition fallback object, if any. |
| 258 | var currentComposition = null; |
no outgoing calls
no test coverage detected