Execute js on DOMContentLoaded in ff-extension
- by ArtWorkAD
Hi,
I want to enable jQuery for my extension. So I want to do something similar to
$(document).ready(function() {
// put all your jQuery goodness in here.
});
So I came up with
var app = window.document.getElementById('page');
app.addEventListener("DOMContentLoaded", onPageLoad, false);
function onPageLoad(){
alert("test");
}
But this does not work at all. Any ideas how to call onPageLoad each time DOM content is reloaded?