Hi All,
I have developed an extension that works across all browser with common javascript (Chrome, Firefox, Edge, Safari, and IE). My problem relates to the Edge browser. I have a web page that creates a custom event. In the extension “content” script, I have an event handler that captures the event. So the web page creates the custom event and dispatches the event, and the event handler is in the content script. Code example…
// Web page
var event = new Event(‘myCoolCustomEvent’);
document.dispatchEvent(event);
// Extension Content script
document.addEventListener(‘myCoolCustomEvent’,
function(e) {
alert(“whoa”)
}, false);
All browsers (primarily FF, Chrome) capture the custom event without issue. Does edge support a custom event from web page to content script? Is there a special premission I have to set within the manifest.
I have tested this in the context of the web page, and the event is captured on the web page. But I want to signal the extension in the content script and it appears that the event is not getting to the content script within Edge.
Is there a permission that I am missing in the manifest?
Thanks,
Tom