From 7775d3c0d6f3efca00611bedd5fc9200689a9f7a Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Sun, 7 Apr 2019 22:16:29 -0700 Subject: [PATCH] docs: remove invalid `async` option from docs (fix #1769) (#1796) --- docs/configuration.md | 1 - src/Clone.js | 1 - src/index.js | 2 -- 3 files changed, 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 88a61d8..d319e6b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -11,7 +11,6 @@ These are all of the available configuration options. | Name | Default | Description | | ------------- | :------: | ----------- | -| async | `true` | Whether to parse and render the element asynchronously | allowTaint | `false` | Whether to allow cross-origin images to taint the canvas | backgroundColor | `#ffffff` | Canvas background color, if none is specified in DOM. Set `null` for transparent | canvas | `null` | Existing `canvas` element to use as a base for drawing on diff --git a/src/Clone.js b/src/Clone.js index 5a173e1..4225c28 100644 --- a/src/Clone.js +++ b/src/Clone.js @@ -184,7 +184,6 @@ export class DocumentCloner { return this.renderer( documentElement, { - async: this.options.async, allowTaint: this.options.allowTaint, backgroundColor: '#ffffff', canvas: null, diff --git a/src/index.js b/src/index.js index d787dfe..8dfeb85 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,6 @@ import Logger from './Logger'; import {renderElement} from './Window'; export type Options = { - async: ?boolean, allowTaint: ?boolean, backgroundColor: string, canvas: ?HTMLCanvasElement, @@ -50,7 +49,6 @@ const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => { const defaultView = ownerDocument.defaultView; const defaultOptions = { - async: true, allowTaint: false, backgroundColor: '#ffffff', imageTimeout: 15000,