Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[benchmarking] Establish and test messaging connection #157

Open
lynchee-owo opened this issue May 3, 2024 · 0 comments · May be fixed by #162
Open

[benchmarking] Establish and test messaging connection #157

lynchee-owo opened this issue May 3, 2024 · 0 comments · May be fixed by #162
Assignees

Comments

@lynchee-owo
Copy link
Contributor

lynchee-owo commented May 3, 2024

disclaimer: this is for benchmarking

Establish a reliable messaging channel between the Python script and the WebWand Chrome extension.

  • Implement the initial setup for the messaging system that allows the Python script to send commands to WebWand.
  • Write and test the openSidePanel function(in background/index.js) to ensure that WebWand can receive this message from the Python script, open the side panel accordingly, and confirm by sending a "panelOpened" message back to the Python script.

Once we are sure messaing connection is established, we can:

  • Identify and document where each listener should reside based on their functionality. For example, openSidePanel might be in background/index.js, but others like runTask might be in a different part of the extension.
  • For each listener identified, develop the specific functionalities they need to execute. For example, storeAPIKey should securely store the received key, runTask should handle task execution, and fetchScreenshot should capture and send back a screenshot.

Note:
think about how to deal with the state manament.

sample code:
chrome.runtime.onMessage.addListener((message) => { if (message.action === "openSidePanel"){ // code to operate and send message } }

Note:
check out the native messaging which enables an extension to exchange messages with a native application, installed on the user's computer. The native messaging serves the extensions without additional accesses over the web.

@lynchee-owo lynchee-owo changed the title Establish and test messaging connection [benchmarking] Establish and test messaging connection May 3, 2024
@lynchee-owo lynchee-owo self-assigned this May 3, 2024
@lynchee-owo lynchee-owo linked a pull request May 8, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant