From 41cfffca0936337b873f2a776005fe2a67687313 Mon Sep 17 00:00:00 2001 From: Anish George Date: Fri, 2 Jun 2023 12:25:11 +0000 Subject: [PATCH] feat: Unblocking clipboard access --- src/postmate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/postmate.js b/src/postmate.js index 0196f0ae..0f1b6470 100644 --- a/src/postmate.js +++ b/src/postmate.js @@ -266,10 +266,12 @@ class Postmate { url, name, classListArray = [], + allow }) { // eslint-disable-line no-undef this.parent = window this.frame = document.createElement('iframe') - this.frame.name = name || '' + if(name) this.frame.name = name + if(allow) this.frame.allow = allow this.frame.classList.add.apply(this.frame.classList, classListArray) container.appendChild(this.frame) this.child = this.frame.contentWindow || this.frame.contentDocument.parentWindow