I'm creating a chrome extension taht access the DOM of page and get value of some inputs . The problem is in the page that i want to access the value of an input text in my content_script i get :
Cannot read property 'val' of null
because , the inputs are generated dynamically from a js file that i cann't modify .
i put the : "run_at" : "document_end" in my manifest file and in the content script i wait the page to be fully loaded
window.addEventListener("load", function load(event){
window.removeEventListener("load", load, false); //remove listener, no longer needed
// $("input[name$='incident.state']").val();
var element =$('#incident.state').val();
alert(element);
},false);