Solo quiero tomar una captura de pantalla de cualquier elemento HTML (div "contenedor" en mi caso). funciona bien en los navegadores Chrome y Firefox, pero no en Safari.
A continuación se muestra cómo lo estoy haciendo:
<!doctype HTML> <HTML> <head> <script type="text/javascript" src="assets/HTML_canvas/html2canvas.js"></script> </head> <body> <h1>Take screenshot of webpage with html2canvas</h1> <div class="container" id='container' > <div style="background-color: blue; height: 50px; width: 50px;">DIV 1</div> <div style="background-color: red; height: 50px; width: 50px;">DIV 2</div> <div style="background-color: green; height: 50px; width: 50px;">DIV 3</div> </div> <input type='button' id='but_screenshot' value='Take screenshot' onclick='screenshot();'><br/> <!-- Script --> <script type='text/javascript'> function screenshot(){ html2canvas(document.getElementById('container')).then(function(canvas) { document.body.appendChild(canvas); }); } </script> </body> </html> muestra el siguiente error en el navegador Safari: 
y aquí está la parte específica del código de html2canvas.js (es el archivo predeterminado que acabo de usar). 
solo tenemos que habilitar el CORS en el navegador safari-mac. Entonces, lo haremos modificando nuestra función screenshot() de la siguiente manera:
function screenshot(){ html2canvas(document.getElementById('id-screenshot'),{ allowTaint: true, useCORS : true, }).then(function(canvas) { console.log("canvas: " + canvas); document.getElementById('test-s').appendChild(canvas); }); }