Skip to main content

Bug Tracker

Side navigation

Ticket #3982: test-3982.html


File test-3982.html, 0.6 KB (added by dmethvin, January 24, 2009 03:38AM UTC)

Test for window.onerror event

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="jquery-1.3.js"></script>
  
<script type="text/javascript">
$(document).ready(function(){

$(window).error(function(msg, url, line){
	alert("jQuery error: "+msg+" "+url+" "+line);
});

window.onerror = function(msg, url, line){
	alert("Native error: "+msg+" "+url+" "+line);
};


setTimeout(function(){ barf() }, 2000);


});
</script>
</head>
<body>

</body>
</html>

Download in other formats:

Original Format