Update document-cloner.ts

This commit is contained in:
Jun
2022-02-24 16:50:05 -08:00
committed by GitHub
parent 4b7e8e03b2
commit 2b80597541

View File

@@ -131,7 +131,7 @@ export class DocumentCloner {
});
documentClone.open();
documentClone.write(serializeDoctype(document.doctype));
documentClone.write(serializeDoctype(document.doctype) as unknown as string);
// Chrome scrolls the parent document for some reason after the write to the cloned window???
restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY);
documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement);