Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
Failed to execute 'createElement' on 'Document': The tag name provided () is is not a valid name

I am trying to spawn the DOM with some snowflakes.. I am getting this error in my console and no snowflakes.

Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('< span id='flake0' style='cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;position:absolute;top:-24'>• </ span>') is not a valid name.

I am not really sure what I am doing wrong here.. PHPStorm is also not giving me any hints. I am looping through all my snowflakes and they get random sizes.

Here is my code:

var container = document.getElementById("js-container");

for (let i = 0; i <= snowMax; i++) {
    var content = document.createElement("<span id='flake" + i + "' style='" + snowStyles + "position:absolute;top:-" + snowMaxSize + "'>" + snowEntity + "</span>");
    container.appendChild(content);
}

I also tried escaping the span with backticks, but it's not helping..

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda