Update CoWebsiteManager.ts

typos and style
This commit is contained in:
TabascoEye 2021-08-30 19:44:50 +02:00 committed by GitHub
parent da03e60de4
commit e6ae343975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,7 +166,7 @@ class CoWebsiteManager {
return iframe; return iframe;
} }
public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string, widthpercent?: number): void { public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string, widthPercent?: number): void {
this.load(); this.load();
this.cowebsiteMainDom.innerHTML = ``; this.cowebsiteMainDom.innerHTML = ``;
@ -190,8 +190,8 @@ class CoWebsiteManager {
.then(() => Promise.race([onloadPromise, onTimeoutPromise])) .then(() => Promise.race([onloadPromise, onTimeoutPromise]))
.then(() => { .then(() => {
this.open(); this.open();
if (widthpercent) { if (widthPercent) {
this.widthpercent = widthpercent; this.widthPercent = widthPercent;
} }
setTimeout(() => { setTimeout(() => {
this.fire(); this.fire();
@ -206,7 +206,7 @@ class CoWebsiteManager {
/** /**
* Just like loadCoWebsite but the div can be filled by the user. * Just like loadCoWebsite but the div can be filled by the user.
*/ */
public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise<void>, jitsiWidth?: number): void { public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise<void>, widthPercent?: number): void {
this.load(); this.load();
this.cowebsiteMainDom.innerHTML = ``; this.cowebsiteMainDom.innerHTML = ``;
this.currentOperationPromise = this.currentOperationPromise this.currentOperationPromise = this.currentOperationPromise
@ -214,7 +214,7 @@ class CoWebsiteManager {
.then(() => { .then(() => {
this.open(); this.open();
if (jitsiWidth) { if (jitsiWidth) {
this.widthpercent = jitsiWidth; this.widthPercent = widthPercent;
} }
setTimeout(() => { setTimeout(() => {
this.fire(); this.fire();