The following jQuery is loaded by a website I'm using:
$("#table").trigger("update");
If I add the following to the bottom of the file that is loaded by the website (using local editing):
$("#table").on('update', function() {console.log('updated!');});
It works! When the "update" event is triggered, the console message is logged.
But, if I add the exact same jQuery to the bottom of the Google Chrome extension's JS file it does not log the console message.
However, if I add
$("#table").on('click', function() {console.log('click');});
Then when I click on it the console message is logged.
Why could this be? There is nothing I can find in the event or subsequent handlers that would prevent it from being passed further along the chain.
manifest.json contains:
"content_scripts": [
{
"matches": [
"<works>*"
],
"run_at": "document_end",
"js": [
"scripts/jquery-1.12.4.min.js",
"scripts/prototype.js"
],
"all_frames": false
}
]