I have a question, and I can't solved. I need get from dev console, the total of errors and warning existent on it.
I have this code to detect erros on JS:
window.onerror = function(error, url, line) {
$('body').append('<div class="teste">'+error+' <br/> on '+url+'<br/>in line: '+line+'</div>');
};
This send to me the error description, url of file and line, but if for example, I have a wrong path of one image on console, I want get him, it's possible?
PS: I need use the errors on console like html on my page. Errors like:
Font from origin 'http://fonts.gstatic.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource......