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ó
  • 541
  • 2
  • 12

1 Answers1

3

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
  • 857,932
  • 118
  • 1,152
  • 1,264