'document.getElementById returns null in Chrome Console

I know, there were millions of such questions, but I just can't find anything that's helpful :(

Why does document.getElementById("game") return null, even if the document clearly contains such element?

enter image description here



Solution 1:[1]

The element with that ID does not belong to the document. It belongs to the shadow DOM attached to the <game-theme-manager> element.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Quentin