Execute csui conditionally

Hi!

Q1: How can I invoke chrome.scripting.executeScript, with the files argument, I mean how do I reference the file, let’s suppose I want to execute a script that it’s in src/scripts/customScript.ts. I’ve tried passing the relative path but it doesn’t seem to work.

Q2: how can I trigger a CSUI only when a certain action happened (conditionally) (context; In my case only if I received a specific websocket message.)

Thank you!
Was this page helpful?