I have a library which sends postMessage to window.ReactNativeWebView object, like this:
Generic Example: window.ReactNativeWebView.postMessage(JSON.stringify({ command, ...(options || {}) }))
In my electron app, I want to create a ReactNativeWebView object on window object, and then listen to the messages sent by the library like this:
window.ReactNativeWebView.addEventListener();
So far I've tried so many ways and nothing seems to work. Can anyone help?