Hi All,
I am having trouble receiving messages in my background page from a popup window I created.
Basically I create a popup up window to prompt the user to set up options. I create the window in the background script after the document is loaded. At the same time I add event listener to listen for messages.
// Background script
chrome.windows.create(
{url: "http://localhost:8081/mypage.php”, type: "popup", width: 600, height: 400}
);
window.addEventListener("message", function(e) {
alert('message received');
})
In the window in the popup I have a script block where I am trying to post option information back to the background. The problem is that I am not receiving the posted message
// popup
window.parent.postMessage({ test: true },'*');
Does anybody know what I am doing wrong? Any suggestions would be greatly appreciated.
Thanks,
Tom
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/41fafeb0-4b69-4c89-bd5f-c9f0594103b3%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.