workadventure/front/src/Api/ScriptUtils.ts

22 lines
512 B
TypeScript
Raw Normal View History

import { coWebsiteManager } from "../WebRtc/CoWebsiteManager";
class ScriptUtils {
public openTab(url: string) {
2021-03-28 16:36:02 +02:00
window.open(url);
}
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
}
public closeCoWebSite() {
2021-03-28 16:36:02 +02:00
coWebsiteManager.closeCoWebsite();
}
}
export const scriptUtils = new ScriptUtils();