The data flow is as following:
- Click
Encrypt
button in React App - React App passes the encrypted string to Chrome Extension content script with
window.postMessage
- Chrome Extension content script pass the encrypted string to Chrome Extension service worker with
chrome.runtime.sendMessage
- Chrome Extension service worker pass the decrypted string to Chrome Extension content script with the
sendResponsecallback
ofchrome.runtime.onMessage
The 3 repos are open sourced at here:
For more detail, please go to https://medium.com/@wk3368/compiling-from-rust-to-webassembly-npm-for-react-app-and-chrome-extension-64a49a42416