workadventure/front/src/Api/ScriptUtils.ts

24 lines
515 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
}
public openCoWebsite(url: string, base: string, api: boolean, policy: string) {
coWebsiteManager.loadCoWebsite(url, base, api, policy);
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();