filthytone
filthytone
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Then you’re back to safe
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Get rid of your externally connectable too if you’re gonna go with scripting
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
🤘
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
i don't know that api, but i'd play w/ returning a Promise that resolves
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
so you just have to iterate it to get the results
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
i think the result of executeScript is a Promise<Array<any>>
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
sounds good .. i use it in production to do something similar where it returns me results and it def works
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Or use the scripting API .. but all of these are viable options depending on what you need to do
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
BUT this approach is better bc it works in Firefox too
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
This is also untrusted data
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Yea that’s what I was saying early on is you have to have a isolated content script proxy it
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
If you inject a function , whatever it returns will be the result of the execute script call
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Another way is use the scripting api to initiate the injection of code from background but yea anything you can do to validate the incoming data will be important
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Yea so if you have to be in main, you have to assume untrusted .. so any validation is good
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
If you see it then it’s exposed to any site
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
You can test by visiting a page , open devtools, and do a chrome.runtime.sendMessage call
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
Yea so that’s like an or statement
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
What did you put for the full value
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
That might be ok but you’ll want to test
73 replies
PD🧩 Plasmo Developers
Created by RandomJay on 10/30/2024 in #🔰newbie
sendToBackground in MAIN world doesn't work even with extensionId provided
So you have to do type checks , sender checks etc
73 replies