forked from sakopqiu/fe_misc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample5.html
More file actions
24 lines (24 loc) · 778 Bytes
/
example5.html
File metadata and controls
24 lines (24 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
document.addEventListener('DOMContentLoaded', function () {
let total = 10;
for (let i = 0; i < 100000; i++) {
total += Math.random() / Math.cos(Math.random());
}
console.log("total is " + total);
});
window.onload = () => {
console.log("DOMContentLoaded listener ran for "
+ (performance.timing.domContentLoadedEventEnd - performance.timing.domContentLoadedEventStart) + "ms")
}
</script>
</body>
</html>