workadventure/front/src/Api/ScriptUtils.ts

24 lines
457 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-03-28 16:36:02 +02:00
public openCoWebsite(url : string){
coWebsiteManager.loadCoWebsite(url,url);
}
2021-03-28 16:36:02 +02:00
public closeCoWebSite(){
coWebsiteManager.closeCoWebsite();
}
}
export const scriptUtils = new ScriptUtils();