-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
37 lines (34 loc) · 812 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<script>
// window.onerror = function(msg, url, row, col, error) {
// console.log(1,{
// msg, url, row, col, error
// });
// return true;
// }
const round = (n, decimals = 0) => Number()
function round(n,decimals = 0){
return Number(`${Math.round(`${n}e${decimals}`)}e-${decimals}`)
}
window.addEventListener('error', (msg, url, row, col, error) => {
debugger
console.log(msg.target.src);
return true;
}, true);
</script>
<body>
<img src="sdfsdfsf">
<script>
new Promise((resolve, reject) => {
resolve();
}).then(function () {
throw 123
})
</script>
</body>
</html>