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

@ -22,7 +22,8 @@ const updatePlayBackSpeed = () => {
const playbackSpeedElement = document.querySelector('#playback-speed-value');
if (playbackSpeedElement) {
playbackSpeedElement.innerHTML = String(playbackSpeed);
const targetHtml = String(playbackSpeed);
playbackSpeedElement.innerHTML = window.trustedTypes?.defaultPolicy ? trustedTypes.defaultPolicy.createHTML(targetHtml) : targetHtml;
}
};