Update serialize-doctype.ts

This commit is contained in:
Jun 2022-02-25 15:01:53 -08:00 committed by GitHub
parent a6fee57c11
commit b119e2a5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,8 @@ const createDocType = (doctype?: DocumentType | null): string => {
let doctypePolicy: TrustedTypePolicy;
if ((window as any).trustedTypes) {
doctypePolicy = (window as any).trustedTypes.createPolicy('html2canvas', {
createHTML: (ignored: string, doctype?: DocumentType | null): TrustedHTML => {
// @ts-ignore
createHTML: (ignored: string, doctype?: DocumentType | null): string => {
return createDocType(doctype);
}
});