I'm messing around with chrome.extension.connect and messages seem to be 
working, but the port's name doesn't appear to get set.  In my content 
script I have just a couple of lines:

var port = chrome.extension.connect({name: "notifyChannel"});
port.postMessage("test");

And in my toolstrip I have a simple listener:

chrome.extension.onConnect.addListener(function(port, name) {
  console.log(name);
  port.onMessage.addListener(MessageHandler);
});

function MessageHandler(msg) {
  console.log(msg);
}

As I mentioned, messages are working except that my output is:

null
test

I was expecting name to be "notifyChannel", but that doesn't seem to 
match up.  Am I doing something wrong?

Cheers,
Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to