* 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)
| 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, |
no outgoing calls
no test coverage detected