Bug Tracker

Ticket #3982: test-3982.html

File test-3982.html, 593 bytes (added by dmethvin, 11 years ago)

Test for window.onerror event

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3<head>
4<script src="jquery-1.3.js"></script>
5 
6<script type="text/javascript">
7$(document).ready(function(){
8
9$(window).error(function(msg, url, line){
10        alert("jQuery error: "+msg+" "+url+" "+line);
11});
12
13window.onerror = function(msg, url, line){
14        alert("Native error: "+msg+" "+url+" "+line);
15};
16
17
18setTimeout(function(){ barf() }, 2000);
19
20
21});
22</script>
23</head>
24<body>
25
26</body>
27</html>