On Wed, Nov 4, 2009 at 11:25 AM, Jean-Lou Dupont <jeanlou.dup...@gmail.com>wrote:
> > > The 'name' field is whatever you passed to chrome.extension.connect() in > the > > second param. I think it would be difficult to guarantee that is unique. > A > > better identifier might be the ID of the tab that sent the message > (assuming > > you're connecting from a content script to a background page), which is > > available on port.sender.tab.id. > > perfect! thanks again! Also note that you can connect from a background page to the content script in a given tab, which might fit your use case better. See http://code.google.com/chrome/extensions/tabs.html#method-connect . one last detail about onDisconnect: how is it called? port.onDisconnect.addListener( function( ?? ) { ... } ); The only argument is the port object itself. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensions@googlegroups.com To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---