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

151
Vistas
How can I fix error in html2canvas library

I was using html2canvas to convert an image in base 64 and send it through PHP and thus store it as a Blob, at first it worked correctly and when I decoded it it showed me the image, but now it shows me this error in the library and I don't know why it happens.

The error is the following:

documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement), documentClone.documentElement);

When I execute the event to take the capture of my html, I get an error in the library code, and my code sends me a base64 image but it does not exist, because the library did not take any capture of my html.

This is my javascript with which I send the image in base64

    html2canvas(document.body).then(function (canvas){

        var ajax = new XMLHttpRequest();
        var num = Math.floor(Math.random()*10000);
        ajax.open("POST", "save-any.php", true);
        ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
        ajax.send("num=" + num + "&image=" + canvas.toDataURL("image/jpeg", 0.9));


    });
}

What happens to me is that the library does not save me any image but it generates a url that does not lead to any image.

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