Hi all,
I have the feeling that
http://code.google.com/chrome/extensions/messaging.html is a bit outdated
(e.g. some params are missing) so I'm wondering if someone could help me
with the following situation.
I have a Browser Action with a popup (popup.js). I have this line:
chrome.extension.sendRequest(undefined, {requestUrl: requestUrl, success:
success, error: opt_error});
(it sends a request to itself containing an object with the above params,
which are defined earlier. There is no callback function)
In the background page, I have:
chrome.extension.onRequest.addListener(
function(req, sender, sendResponse) {
console.log("got request");
// TODO: Do something.
});
The console log doesn't show any messages, and any code I place in there
doesn't seem to execute. Just for kicks I also added "sendResponse();" to
the end but it didn't make a difference, either.
Any idea what's up? I assume that I can send messages from the popup to the
background page...are there any tricks to it? FYI I'm doing this on linux.
thanks,
Paul
--
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.