fix: actually allow script in the transform target, closes #2200 (#2203)

This commit is contained in:
Huang Xin
2025-10-11 18:59:55 +08:00
committed by GitHub
parent 00af4a3d60
commit 08e558bd41
@@ -287,7 +287,7 @@ const FoliateViewer: React.FC<{
book.transformTarget?.addEventListener('load', (event: Event) => {
const { detail } = event as CustomEvent;
if (detail.isScript) {
detail.allowScript = viewSettings.allowScript ?? false;
detail.allow = viewSettings.allowScript ?? false;
}
});
const viewWidth = appService?.isMobile ? screen.width : window.innerWidth;