title: How to send trigger function in injected_scripts in devtools
body: <p>I have a working extension, but it the dev tool works once only, during initialization, which in manifest I have a content_script defined and that content_script injects a injected_script which relays a series of events</p>
  
  <pre><code>window.postMessage({ eventName: window.appName, ... [other details] })
  
  and thru injected -&gt; content -&gt; background -&gt; devtools, it gets to devtools.
  </code></pre>
  
  <p>But what if I want to re-run this injected script, say when I click a button on devtool panel, and what if I want to give some parameters for the data I expect to get back</p>
  
  <p>e.g.</p>
  
  <pre><code>// devtools.js
  sendToInjectedScript({params: ['appName', 'location']})
  
  // injectedScript.js
  // accepts params
  window.postMessage({message: params.map((p) =&gt; window[p]})
  </code></pre>
  
  <p>how would I do that?</p>