mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-22 01:35:31 -05:00
52 lines
1.5 KiB
HTML
52 lines
1.5 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title></title>
|
|
<script type="text/javascript" charset="utf-8" src="lib/long-stack-traces.js"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
function initSecondTimeout(tag) {
|
|
setTimeout(function secondTimeout() {
|
|
try {
|
|
throw new Error(tag);
|
|
} catch (e) {
|
|
console.log(e.stack)
|
|
}
|
|
}, 1000);
|
|
}
|
|
|
|
function onload() {
|
|
// function f() {
|
|
// throw new Error('foo');
|
|
// }
|
|
// setTimeout(f, Math.random()*1000);
|
|
// setTimeout(f, Math.random()*1000);
|
|
|
|
setTimeout(function firstTimeout() {
|
|
initSecondTimeout("timeout");
|
|
}, 1000);
|
|
|
|
document.getElementById("button").addEventListener("click", function baz() {
|
|
initSecondTimeout("click");
|
|
}, false);
|
|
|
|
var req = new XMLHttpRequest();
|
|
req.onreadystatechange = function() {
|
|
if (this.readyState === 4) {
|
|
initSecondTimeout("onreadystatechange");
|
|
}
|
|
}
|
|
req.open("GET", "README.md", false);
|
|
req.send();
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body onload="onload();">
|
|
<input type="button" value="click me!" id="button">
|
|
</body>
|
|
</html>
|