Two suggestions (one I accidentally sent only to James):

chrome.extension.Port:

// ID of the extension at the other side of this port.
String senderID;

Port currently has a 'tab' property if the sender was a tab.  Maybe we
should group these:

chrome.extension.Port:
  Object sender:
    Object tab; // if the sender was a tab
    String id;  // ID of the sending extension.


chrome.extension:



// Open a channel to another extension with the provided ID.


// If no extension with the provided ID exists, nothing happens.



// Otherwise the chrome.extension.onConnectExternal event is fired


// to all components of the extension with the provided ID each time



// the method is called.


// The channel can optionally be named. This name will be sent along



// with the onConnectExternal event


Port connectExternal(string ID, [string channelName])



It makes more sense to me to have the API mirror the regular connect event:

>   chrome.extension.connect();  // connects to my own extension

>   other = new chrome.Extension('abcef...');
  other.connect();  // connects to extension abcdef...

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to