On http://snippet.christopherkade.com I let my user download code snippets, I use html2canvas
to render and save the console displayed on the screen. This works just fine on Firefox, but Chrome displays this error:
Not allowed to navigate top frame to data URL
When I do the following:
// Opens a window with the console to be copied or downloaded
html2canvas(document.getElementsByClassName('console'), {
onrendered: function(canvas) {
var img = canvas.toDataURL()
window.open(img);
}
});
Note that Chrome displays a blank page with the error in my console.
The only information I have found is here. But it only explains why Google has made this decision and I was not able to see a solution.