So on 2 pages I load scripts manifest
{ "manifest_version": 2, "name": "Empty", "version": "1.0", "icons": { "16": "images/empty_16.png", "32": "images/empty_32.png", "48": "images/empty_48.png", "64": "images/empty_64.png", "128": "images/empty_128.png" }, "permissions": [ "https://web.skype.com/*", "http://flparser/*" ], "content_scripts": [ { "matches": [ "https://web.skype.com/*" ], "js": ["content_scripts/webskype.js"] }, { "matches": [ "http://flparser/*" ], "js": ["content_scripts/flparser.js"] }] }
In one of them I hang events
console.log("1"); chrome.runtime.onMessage.addListener(function(request, sender, callback) { debugger; console.log(arguments); }); in another, I'm trying to trigger an event
var deleteLink = document.querySelectorAll(".bro-sendskype"); for (var i = 0; i < deleteLink.length; i++) { deleteLink[i].addEventListener('click', function(event) { debugger; chrome.runtime.sendMessage('start'); },false); } The code works exactly, that is, the handlers are hung and the message is sent, but it is not caught and does not write any errors to the console, what could be the problem? or mb there is an easier way to catch a house event from another tab