From 7c89cf0e479c5846881041112009b0dfb58e4052 Mon Sep 17 00:00:00 2001 From: Oliver Lorenz Date: Tue, 29 Dec 2020 23:17:16 +0100 Subject: [PATCH] feat: adds property openWebsitePolicy to set allow property in iframe --- front/src/Phaser/Game/GameScene.ts | 2 +- front/src/WebRtc/CoWebsiteManager.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 67380309..8e037eab 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -604,7 +604,7 @@ export class GameScene extends ResizableScene implements CenterListener { coWebsiteManager.closeCoWebsite(); }else{ const openWebsiteFunction = () => { - coWebsiteManager.loadCoWebsite(newValue as string); + coWebsiteManager.loadCoWebsite(newValue as string, allProps.get('openWebsitePolicy') as string | undefined); layoutManager.removeActionButton('openWebsite', this.userInputManager); }; diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index e9564222..ef73ac1d 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -42,7 +42,7 @@ class CoWebsiteManager { this.opened = iframeStates.opened; } - public loadCoWebsite(url: string): void { + public loadCoWebsite(url: string, allowPolicy?: string): void { this.load(); this.cowebsiteDiv.innerHTML = `