Console.dir (this) produces no output

I have it:

<body>
<script>
console.log(this);
console.dir(this);
console.dirxml(this);
</script>
</body>

Why doesn't console.dir (this) produce any output?

+3
source share
1 answer

It should show the console object, as it would in the DOM panel. But he will pay attention to your settings. Go to the DOM tab and click the triangle menu button and make sure that it shows user properties and user functions. Then try again.

+2
source

Source: https://habr.com/ru/post/1782346/


All Articles