This is a proof of concept for using Web Accessible Resources to relay messages from a web page to a Chrome extension.
To use it:
-
Activate Chrome Developer Mode and load the unpacked extension from extension/. Note the extension ID.
-
Modify page/index.html to configure the
iframe
elementsrc
attribute with the extension ID from step 1. -
Using a local web server, use Chrome to open page/index.html.
When you open the page, it should send the string "hello" to the extension. The extension will reverse the string and send it back to the web page.