This is my code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<canvas id="field"></canvas>
</body>
</html>
That's it. There's no scripts being imported, nothing. And yet, in my browser (Chrome) console, the variable field
is already defined and holds the value of the <canvas>
element! I started out with more code but I took all of it away step by step, and concluded that I'm not doing this! Is this just a Chrome thing, or does JS just natively do this? Or is it some weird user configuration that I have?