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

154
Vistas
Onclick event creates element with locked size

When I press the button, it will create the element but even though it says it's parent is document.body, the size of the element created is locked to the size of the parent element of the button. the problem shown

function example() {
  let go = document.getElementById("here");
  let toappend = new DOMParser().parseFromString(`<div style="background-color: red; width: 50px; height: 50px;">shouldnt be able to go outside of the bounds of the div the button was in.</div>`, "text/xml");
  go.appendChild(toappend);
}
<div id="here"></div>
<div style="width:200px; length:200px;">
  <button onclick="example()">press this</button>
</div>

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