title: How to execute a callback on the devtools page from page's JS?
body: <p>I am trying to write a Chrome devtools extension for a JS SDK we have developed. This SDK has an API <code>addEventListener</code> (the events are not DOM events) that I would like to use to be able to display all the events that are being published in the devtools panel I made. </p>
  
  <p>Basically I would like to be able to have the following code in my devtools page script :</p>
  
  <pre><code>chrome.devtools.inspectedWindow.eval(
              "mySDKonTheContentPage", function(result, isException){
                  mySDK =result;
                  mySDK.addEventListener("myEvent", function(){
                     doSomethingInDevtoolsUI();
                 });
              });
  </code></pre>
  
  <p>Since content scripts don't have access (do they?) to the page's JS objects, I don't really know where to start. </p>