From e5edf158c8ef38695311dcdfeb187d629a799ed5 Mon Sep 17 00:00:00 2001 From: pamapa Date: Tue, 10 Dec 2024 16:43:30 +0100 Subject: [PATCH] fix: #1735 add iframe attribute sandbox to allow access to local storage --- src/navigators/IFrameWindow.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/navigators/IFrameWindow.ts b/src/navigators/IFrameWindow.ts index d8720b27d..1a6b2d34b 100644 --- a/src/navigators/IFrameWindow.ts +++ b/src/navigators/IFrameWindow.ts @@ -43,6 +43,12 @@ export class IFrameWindow extends AbstractChildWindow { iframe.width = "0"; iframe.height = "0"; + // allow access to local storage + iframe.setAttribute( + "sandbox", + "allow-storage-access-by-user-activation allow-scripts allow-same-origin", + ); + window.document.body.appendChild(iframe); return iframe; }