partey_workadventure/front/src/Api/ScriptUtils.ts

24 lines
472 B
TypeScript
Raw Normal View History

import {coWebsiteManager} from "../WebRtc/CoWebsiteManager";
class ScriptUtils {
2021-03-28 16:36:02 +02:00
public openTab(url : string){
window.open(url);
}
2021-03-28 16:36:02 +02:00
public goToPage(url : string){
window.location.href = url;
2021-03-28 16:36:02 +02:00
}
2021-05-01 17:43:31 +02:00
public openCoWebsite(url: string, base: string) {
2021-05-03 16:11:16 +02:00
coWebsiteManager.loadCoWebsite(url, base);
2021-03-28 16:36:02 +02:00
}
2021-03-28 16:36:02 +02:00
public closeCoWebSite(){
coWebsiteManager.closeCoWebsite();
}
}
export const scriptUtils = new ScriptUtils();