import { TEXT_NODE } from '../shared/HTMLNodeType' ; import { AnyNativeEvent } from './PluginModuleType' ; export const getEventTarget = ( nativeEvent ) => { const target = ( nativeEvent . target || window ) as Element ; return target . nodeType === TEXT_NODE ? target . parentNode : target ; } ;