From 3aa9e7b66d8714cfb2986abace49a4f9cd27b67e Mon Sep 17 00:00:00 2001 From: jnunez Date: Wed, 9 Mar 2022 16:20:05 +0100 Subject: [PATCH] add original node name in cloned custom element --- src/dom/document-cloner.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dom/document-cloner.ts b/src/dom/document-cloner.ts index 08faa29..2afb4cf 100644 --- a/src/dom/document-cloner.ts +++ b/src/dom/document-cloner.ts @@ -174,6 +174,7 @@ export class DocumentCloner { createCustomElementClone(node: HTMLElement): HTMLElement { const clone = document.createElement('html2canvascustomelement'); + clone.setAttribute('html2-canvas-original-tag-name', node.tagName); copyCSSStyles(node.style, clone); return clone;