docs: fix typo (#1864)

This commit is contained in:
MoyuScript 2019-06-18 16:24:34 +12:00
parent 50337544c5
commit ee44089287

View File

@ -42,7 +42,7 @@ support [older browsers](http://caniuse.com/#search=promise) that do not nativel
To render an `element` with html2canvas, simply call:
` html2canvas(element[, options]);`
The function returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) containing the `<canvas>` element. Simply add a promise fullfillment handler to the promise using `then`:
The function returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) containing the `<canvas>` element. Simply add a promise fulfillment handler to the promise using `then`:
html2canvas(document.body).then(function(canvas) {
document.body.appendChild(canvas);