On Monday, 22 July 2013 10:30:10 UTC+12, Quintillus Apollon wrote:
> It means you are trying to add an event listener to a non-existent object in your code.
There are only two places where I do that:
- One is in the injected content java script, so that my extension can ask it to do stuff.
chrome.runtime.onMessage.addListener(
function(Msg, Sender, sendResponse) {
....
});
- The other is in the background of my extension where all I want to do is
the moment my injected script loads. I would much prefer to get the injected script to show the pageAction directly, but that doesn't seem to work.
On Monday, 22 July 2013 10:30:10 UTC+12, Quintillus Apollon wrote:
> If you are willing to share your code someone can point out the offending line(s). A common mistake (in my experience) is to accidentally type something like "chrome.tab.onCreated.addListener" rather than "chrome.tabs.onCreated.addListener"
I am happy to share my code.
It is an extension to deal with malevolent "flag for spam" on youtube comments.
Embarrassingly messy still, because this is my first ever browser extension (and I'm learning javascript as I go). However most of it works so if anyone does want to have a look I put in a .zip file here:
http://piedpiper.site40.net/MyImages.php/ChromeForum/YtFlagChrome.zip