title: Sharing Functions between Chrome Extensions
body: <p>I am making an extension (<code>A</code>) for Chrome that communicates with another extension (<code>B</code>). I want <code>A</code> to provide the <code>B</code> a function, but it won't send. I can send strings just fine.</p>
  
  <p><code>A</code> has the following code. <code>rect</code> is the function in this code.</p>
  
  <pre><code>chrome.extension.onRequestExternal.addListener(
      function(request, sender, sendResponse) {
         obj = {}
         obj.permisions = "all"
         obj.rect = Rect
         alert(obj.permisions+","+obj.rect)
         sendResponse(obj); 
  });
  </code></pre>
  
  <p>...this code works just fine. The alert shows a box that says "all", then prints out the function.</p>
  
  <p><code>B</code> has the following code.</p>
  
  <pre><code>chrome.extension.sendRequest(ext[i].id, {}, function(lib) {
      alert(lib.permisions+","+lib.rect)
  });
  </code></pre>
  
  <p>The alert on this one shows "all,undefined". Can functions not be passed between extensions?</p>