Add new click event to close co website

This commit is contained in:
Gregoire Parant 2020-12-17 16:36:01 +01:00
parent 6d4e5bcb99
commit 08ce954f56

View File

@ -47,6 +47,13 @@ class CoWebsiteManager {
this.cowebsiteDiv.innerHTML = `<button class="close-btn" id="cowebsite-close"> this.cowebsiteDiv.innerHTML = `<button class="close-btn" id="cowebsite-close">
<img src="resources/logos/close.svg"> <img src="resources/logos/close.svg">
</button>`; </button>`;
setTimeout(() => {
try {
HtmlUtils.getElementByIdOrFail('cowebsite-close').addEventListener('click', () => {
this.closeCoWebsite();
});
}catch (err){throw err}
}, 100);
const iframe = document.createElement('iframe'); const iframe = document.createElement('iframe');
iframe.id = 'cowebsite-iframe'; iframe.id = 'cowebsite-iframe';