I currently have a javascript error handler like this:
window.onerror = function(msg, url, line){ //stuff }};
But I would like to be able to use jquery to attach to onerror like so:
$(window).error(function(evtData){//stuff});
My question is, from jquery’s eventData object, how can i get the error’s message, url, and line number, as I did in the non-jquery function?
Thanks in advance.
From jQuery docs.
Refernce: http://api.jquery.com/error/