fixed url cannot be relative

This commit is contained in:
jonny 2021-05-01 17:43:31 +02:00
parent 746f1029a8
commit d674ac9e0c
2 changed files with 7 additions and 4 deletions

View File

@ -86,8 +86,12 @@ class IframeListener {
else if(payload.type === 'goToPage' && isGoToPageEvent(payload.data)) {
scriptUtils.goToPage(payload.data.url);
}
else if(payload.type === 'openCoWebSite' && isOpenCoWebsite(payload.data)) {
scriptUtils.openCoWebsite(payload.data.url);
else if (payload.type === 'openCoWebSite' && isOpenCoWebsite(payload.data)) {
const scriptUrl = [...this.scripts.keys()].find(key => {
return this.scripts.get(key)?.contentWindow == message.source
})
scriptUtils.openCoWebsite(payload.data.url, scriptUrl || payload.data.url);
}
else if(payload.type === 'closeCoWebSite') {
scriptUtils.closeCoWebSite();

View File

@ -11,8 +11,7 @@ class ScriptUtils {
}
public openCoWebsite(url : string){
coWebsiteManager.loadCoWebsite(url,url);
public openCoWebsite(url: string, base: string) {
}
public closeCoWebSite(){