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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);