Ok guys I have a chrome extension that run a process of sending an information to a cardreader (POS) and after I now a that the transaction was successful, how can I send a message back from my extension to the website?. Also I saw in the documentation that you can send message from the website to the extension but I didn't found any information sending back wards (extension to web app). I believe documentation lack that information or I am not understanding that that documentation. Please any feedback I will appreciate it!!!
Asked
Active
Viewed 1,052 times
0
-
Use a content script to send a normal DOM message via dispatchEvent and CustomEvent. – wOxxOm Jul 08 '17 at 06:30
-
Well you've already cited the docs, so in addition to that and what woXXom said, you have to check real samples like this [native messaging sample](https://github.com/orbitbot/chrome-extensions-examples/tree/master/app) and this [timer sample](https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/docs/examples/api/messaging/timer?autodive=0/). There's also this [sending message to chrome extension from a web page](https://stackoverflow.com/questions/11431337/sending-message-to-chrome-extension-from-a-web-page) for more reference. – ReyAnthonyRenacia Jul 08 '17 at 18:34
-
Possible duplicate of [Pass a message from Chrome Extension to Webpage](https://stackoverflow.com/questions/19035159/pass-a-message-from-chrome-extension-to-webpage) – Makyen Jul 10 '17 at 08:11