Help get this topic noticed by sharing it on Twitter, Facebook, or email.

IE, popup, includeCSS, and addListener not working together

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?
1 person has
this problem
+1
Reply