0

I was using this script with these settings:

<script type="text/javascript">
window.takeScreenShot = function() {
html2canvas(document.getElementById("masterslider"), {
onrendered: function (canvas) {
document.body.appendChild(canvas);
    },
    width:null,
    height:null,
    allowTaint:true
});
}
</script>

After latest release, i don`t know where to put options (width,height,taint):

<script type="text/javascript">
window.takeScreenShot = function() {
html2canvas(document.getElementById("masterslider")).then(function(canvas)     {
document.body.appendChild(canvas);
});
}
</script>

Can you help me and show, where to put options?

1 Answers1

1

Take a look at the html2canvas documentation. On there, it says that html2canvas is called as html2canvas(element, options)

So your new code should look like:

<script type="text/javascript">
    window.takeScreenShot = function () {
        html2canvas(document.getElementById("masterslider"), {
            onrendered: function (canvas) {
                document.body.appendChild(canvas);
            },
            width: null,
            height: null,
            allowTaint: true
        }).then(function (canvas) {
            document.body.appendChild(canvas);
        });
    }
</script>
Solver
  • 618
  • 7
  • 15