I seem to have an issue in which in my popup.html code, if I use:
appAPI.resources.includeCSS
then my event listener is never called when background.js sends it messages:
appAPI.message.addListener. This is ONLY on IE, it is working fine on Firefox and Chrome.
From background.js:
appAPI.browserAction.setPopup({
resourcePath: 'popup.html',
height: 100,
width: 350
});
on_popup_ready(msg) {
appAPI.message.toPopup({ action: 'show_menu', menu_items: menu_items });
}
From popup.html:
function crossriderMain(jQuery) {
appAPI.message.addListener(on_message_from_background);
appAPI.message.toBackground({action: 'popup_ready' });
appAPI.resources.includeCSS('popup.css');
}
function on_message_from_background(msg) {
console.log("msg from background...");
}
Basically, in IE only, my popup on_message_from_background is never called. But if I comment out the includeCSS line, then it gets called. However, I of course need the CSS file.
There seems to be some kind of interaction bug happening here. Can you please advise?
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
IE, popup, includeCSS, and addListener not working together
-
I have also tried moving the includeCSS line to the top of crossriderMain(), but it didn't change any of the observed behavior.
-
-
Hello Bryan,
From the code provided, I can't see an appAPI.message.addListener call in the background.js file. Please provide the extension id and I will be happy to investigate.
Also, please let me know which version of IE this occurs in and which version on Windows. -
Loading Profile...




EMPLOYEE
