mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-06 14:50:21 -05:00
feat: iframe sandbox permission
This commit is contained in:
parent
4e3c25e3ed
commit
9d2eafc1be
1 changed files with 9 additions and 0 deletions
|
@ -46,6 +46,15 @@ export class PluginModalElement extends HTMLElement {
|
|||
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = iframeSrc;
|
||||
iframe.allow = '';
|
||||
iframe.sandbox.add(
|
||||
'allow-scripts',
|
||||
'allow-forms',
|
||||
'allow-modals',
|
||||
'allow-popups',
|
||||
'allow-popups-to-escape-sandbox',
|
||||
'allow-storage-access-by-user-activation'
|
||||
);
|
||||
|
||||
this.addEventListener('message', (e: Event) => {
|
||||
if (!iframe.contentWindow) {
|
||||
|
|
Loading…
Reference in a new issue