This commit is contained in:
codepo8 2021-03-18 22:52:44 +01:00
Родитель 4e670cdf63
Коммит 98478f481e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 114D267A0A7E894A
2 изменённых файлов: 63 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript error and trace creation in the Console tool</title>
<link rel="shortcut icon" type="image/ico" href="favicon_io/favicon.ico"/>
<link rel="stylesheet" href="demostyles.css">
</head>
<body>
<h1>I've reported a few issues 😳</h1>
<p>There is nothing to see here, you need to open the Developer Tools and check the console for the output.</p>
<p>Select <code>Control</code>+<code>Shift</code>+<code>J</code> (Windows, Linux) or <code>Command</code>+<code>Option</code>+<code>J</code> (macOS).</p>
<script>
function first(name) { second(name); }
function second(name) { third(name); }
function third(name) {
if (!name) {
console.error(`Name isn't defined :(`)
} else {
console.assert(
name.length <= 8,
`"${name} is not less than eight letters"`
);
}
}
first();
first('Console');
first('Microsoft Edge Canary');
</script>
</body>
</html>

27
docs/console/trace.html Normal file
Просмотреть файл

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript error and trace creation in the Console tool</title>
<link rel="shortcut icon" type="image/ico" href="favicon_io/favicon.ico"/>
<link rel="stylesheet" href="demostyles.css">
</head>
<body>
<h1>I've logged a trace 🪜</h1>
<p>There is nothing to see here, you need to open the Developer Tools and check the console for the output.</p>
<p>Select <code>Control</code>+<code>Shift</code>+<code>J</code> (Windows, Linux) or <code>Command</code>+<code>Option</code>+<code>J</code> (macOS).</p>
<script>
function here() {there()}
function there() {everywhere()}
function everywhere() {
console.trace();
}
here();
there();
</script>
</body>
</html>