docs: fix typo (#1864)

This commit is contained in:
Jason Cooke 2019-06-18 16:24:34 +12:00 committed by Niklas von Hertzen
parent 81dcf7b6be
commit 9a63797aa7

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: To render an `element` with html2canvas, simply call:
` html2canvas(element[, options]);` ` 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) { html2canvas(document.body).then(function(canvas) {
document.body.appendChild(canvas); document.body.appendChild(canvas);