mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Set the document clone iframe container's size via the style attribute
This prevents CSS rules from overriding the iframe's size which would compromise the screenshot
This commit is contained in:
parent
6020386bbe
commit
d2d83ada44
@ -503,6 +503,8 @@ const createIFrameContainer = (ownerDocument: Document, bounds: Bounds): HTMLIFr
|
||||
cloneIframeContainer.style.border = '0';
|
||||
cloneIframeContainer.width = bounds.width.toString();
|
||||
cloneIframeContainer.height = bounds.height.toString();
|
||||
cloneIframeContainer.style.width = bounds.width.toString() + 'px';
|
||||
cloneIframeContainer.style.height = bounds.height.toString() + 'px';
|
||||
cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
|
||||
cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
|
||||
ownerDocument.body.appendChild(cloneIframeContainer);
|
||||
|
Loading…
Reference in New Issue
Block a user