0

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

Rafaó
  • 591
  • 3
  • 14

1 Answers1

4

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

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335