|
1 <!-- Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ --> |
|
3 <!doctype html> |
|
4 |
|
5 <html> |
|
6 <head> |
|
7 <meta charset="utf-8"/> |
|
8 <title>Debugger test page</title> |
|
9 </head> |
|
10 |
|
11 <body> |
|
12 <button>Click me!</button> |
|
13 <ul></ul> |
|
14 |
|
15 <script type="text/javascript"> |
|
16 window.addEventListener("load", function() { |
|
17 function test() { |
|
18 try { |
|
19 throw new Error("boom"); |
|
20 } catch (e) { |
|
21 var list = document.querySelector("ul"); |
|
22 var item = document.createElement("li"); |
|
23 item.innerHTML = e.message; |
|
24 list.appendChild(item); |
|
25 } finally { |
|
26 debugger; |
|
27 } |
|
28 } |
|
29 var button = document.querySelector("button"); |
|
30 button.addEventListener("click", test, false); |
|
31 }); |
|
32 </script> |
|
33 </body> |
|
34 |
|
35 </html> |