mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-08 16:00:27 -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');
|
const iframe = document.createElement('iframe');
|
||||||
iframe.src = iframeSrc;
|
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) => {
|
this.addEventListener('message', (e: Event) => {
|
||||||
if (!iframe.contentWindow) {
|
if (!iframe.contentWindow) {
|
||||||
|
|
Loading…
Reference in a new issue