You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,22 @@ Note that the compatibility will most likely be increased in future builds, as m
31
31
There are still a lot of CSS properties missing, including most CSS3 properties such as <code>text-shadow</code>, <code>box-radius</code> etc. as well as all elements created by the browser, such as radio and checkbox buttons and list icons. I will compile a full list of supported elements and CSS properties soon.
32
32
There is no support for <code>frame</code> and <code>object</code> content such as Flash.
33
33
34
+
### Usage ###
35
+
To render an `element` with html2canvas, simply call:
36
+
` html2canvas( [ element ], options);`
37
+
38
+
To access the created canvas, provide the `onrendered` event in the options which returns the canvas element as the first argument, as such:
39
+
40
+
html2canvas( [ document.body ], {
41
+
onrendered: function( canvas ) {
42
+
/* canvas is the actual canvas element,
43
+
to append it to the page call for example
44
+
document.body.appendChild( canvas );
45
+
*/
46
+
}
47
+
);
48
+
49
+
34
50
### Examples ###
35
51
36
52
For more information and examples, please visit the <ahref="http://html2canvas.hertzen.com">homepage</a> or try the <ahref="http://html2canvas.hertzen.com/screenshots.html">test console</a>.
@@ -39,7 +55,7 @@ For more information and examples, please visit the <a href="http://html2canvas.
0 commit comments