workadventure/front/src/Api/ScriptUtils.ts
DESKTOP-FMM8UI0\CLV 8764fe5de5 Popup openWebSite
Add possibility to open a website with a popup
3 cases :
Open page
GoTo Page
OpenCoWebsite
2021-03-25 17:12:53 +01:00

26 lines
411 B
TypeScript

import {coWebsiteManager} from "../WebRtc/CoWebsiteManager";
class ScriptUtils {
public openTab(url : string){
window.open(url);
}
public goToPage(url : string){
window.location.href = url;
}
public openCoWebsite(url : string){
coWebsiteManager.loadCoWebsite(url,url);
}
public closeCoWebSite(){
coWebsiteManager.closeCoWebsite();
}
}
export const scriptUtils = new ScriptUtils();