Open windydang26 opened 6 years ago
events to native code?
yes! i'm using react-native. events still running, but seem is web enviroment. i cannot consolog, only alert() as web. how to transmission params of hightchart to component?
Webview component injects a function called postMessage
in your webview html when you pass onMessage
prop to it. You can use this postMessage
to fire events from webview.
You can try something like this https://snack.expo.io/Bycv3CnMz
oh! thank you very much! i will try it :)
@jinxac Webview component in library not contain onMessage props. i fork repo and edit but cannot fire onMessage. i want to fire event to receiver data point when click in highchart? are you have other idea? thank.
are u trying this on android @windydang26 ?
so sorry. i forget method window.postMessage. after i use postMessage to send data and onMessage to receiver data as you told. i fired events. hi. thank you @jinxac :)
Hi try to change from source={{ html: newHTML, baseUrl: 'web/' }}
to source={{ html: newHTML, baseUrl: 'http://localhost' }}
.
It will work, or else try to remove baseUrl from the source attribute.
i cannot catch event. someone any suggest?