fix: trustedTypes issue

- Close #2339
This commit is contained in:
JellyBrick
2024-10-16 20:40:35 +09:00
parent 11b11ed966
commit 9bc42f836f
5 changed files with 9 additions and 5 deletions

View File

@ -107,7 +107,8 @@ export const onRendererLoad = ({
ipc.on('downloader-feedback', (feedback: string) => {
if (progress) {
progress.innerHTML = feedback || t('plugins.downloader.templates.button');
const targetHtml = feedback || t('plugins.downloader.templates.button');
progress.innerHTML = window.trustedTypes?.defaultPolicy ? window.trustedTypes.defaultPolicy.createHTML(targetHtml) : targetHtml;
} else {
console.warn(
LoggerPrefix,