fixed url cannot be relative
This commit is contained in:
parent
746f1029a8
commit
d674ac9e0c
@ -86,8 +86,12 @@ class IframeListener {
|
|||||||
else if(payload.type === 'goToPage' && isGoToPageEvent(payload.data)) {
|
else if(payload.type === 'goToPage' && isGoToPageEvent(payload.data)) {
|
||||||
scriptUtils.goToPage(payload.data.url);
|
scriptUtils.goToPage(payload.data.url);
|
||||||
}
|
}
|
||||||
else if(payload.type === 'openCoWebSite' && isOpenCoWebsite(payload.data)) {
|
else if (payload.type === 'openCoWebSite' && isOpenCoWebsite(payload.data)) {
|
||||||
scriptUtils.openCoWebsite(payload.data.url);
|
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') {
|
else if(payload.type === 'closeCoWebSite') {
|
||||||
scriptUtils.closeCoWebSite();
|
scriptUtils.closeCoWebSite();
|
||||||
|
@ -11,8 +11,7 @@ class ScriptUtils {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public openCoWebsite(url : string){
|
public openCoWebsite(url: string, base: string) {
|
||||||
coWebsiteManager.loadCoWebsite(url,url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeCoWebSite(){
|
public closeCoWebSite(){
|
||||||
|
Loading…
Reference in New Issue
Block a user