From 08ce954f56329ccdcdbdb8dc2f63ebc722955ece Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Thu, 17 Dec 2020 16:36:01 +0100 Subject: [PATCH] Add new click event to close co website --- front/src/WebRtc/CoWebsiteManager.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index e6d5b748..72100ffe 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -47,6 +47,13 @@ class CoWebsiteManager { this.cowebsiteDiv.innerHTML = ``; + setTimeout(() => { + try { + HtmlUtils.getElementByIdOrFail('cowebsite-close').addEventListener('click', () => { + this.closeCoWebsite(); + }); + }catch (err){throw err} + }, 100); const iframe = document.createElement('iframe'); iframe.id = 'cowebsite-iframe';