I'm trying to create a Chrome extension, and I need the event handler to listen on each page that get's loaded. Currently, (for testing purposes) I have the following:
function onPageLoad(event)
{
alert("Page Loaded");
}
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener("DOMContentLoaded", onPageLoad, true);
});
This, however, does not display the alert message and I cannot for the lift of me seem to work out where I am going wrong.