mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Remove redundant style nodes from clone
This commit is contained in:
@@ -93,7 +93,9 @@ export class DocumentCloner {
|
||||
|
||||
for (let child = node.firstChild; child; child = child.nextSibling) {
|
||||
if (child.nodeType !== Node.ELEMENT_NODE || child.nodeName !== 'SCRIPT') {
|
||||
clone.appendChild(this.cloneNode(child));
|
||||
if (!this.copyStyles || child.nodeName !== 'STYLE') {
|
||||
clone.appendChild(this.cloneNode(child));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (node instanceof HTMLElement && clone instanceof HTMLElement) {
|
||||
|
||||
Reference in New Issue
Block a user