mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Add deprecation warning for onrendered (Fix #1290)
This commit is contained in:
parent
166cbba7c2
commit
b8178e92b4
@ -39,6 +39,12 @@ const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => {
|
||||
const config = conf || {};
|
||||
const logger = new Logger();
|
||||
|
||||
if (__DEV__ && typeof config.onrendered === 'function') {
|
||||
logger.error(
|
||||
`onrendered option is deprecated, html2canvas returns a Promise with the canvas as the value`
|
||||
);
|
||||
}
|
||||
|
||||
const ownerDocument = element.ownerDocument;
|
||||
if (!ownerDocument) {
|
||||
return Promise.reject(`Provided element is not within a Document`);
|
||||
|
Loading…
Reference in New Issue
Block a user