Html2Canvas: Why is this not working?

Trying to figure out why this is not working, it should take a screenshot of "Hello" onload but isn't doing anything?

Thanks in advanced to anyone that can help me, I am unfamiliar with javascript and I am only using it to do this function.

<html>
<body>
<script src="html2canvas.js">
  window.onload = function(){
    html2canvas(document.body, {
    onrendered: function(canvas) {
    document.body.appendChild(canvas);
    },
width: 300,
height: 300
})};
</script>
</body>
<h1>Hello</h1>

<canvas id="canvas" width="300" height="300" style="border:1px solid      #d3d3d3;">

</html>

Answers


Try this...

    <html>
<body>
<script src="html2canvas.js">
  window.onload = function(){
    html2canvas(document.body, {
    onrendered: function(canvas) {
    document.body.appendChild(canvas);
    },
width: 300,
height: 300
})};
</script>
<h1>Hello</h1>

<canvas id="canvas" width="300" height="300" style="border:1px solid      #d3d3d3;">
</body>


</html>

Move your canvas and h1 tags within the and tags.


Need Your Help

Want to replace a specific word between 2 strings in linux file

regex linux bash sed awk

I want to replace every "&lt;TD&gt;" with "&lt;TH&gt;" in every line of my file but only after "&lt;TD&gt;Grand Total" to "&lt;/TABLE&gt;" keyword but not before "&lt;TD&gt;Grand Total" keyword wit...

Integration Services and Isolation Level

ssis transactions isolation

We have a data-warehousing package that our clients run during the day against their live transactional system. On most clients this seems to work fine but on busy clients we get deadlocking error...