converted goToRoom to typed call

This commit is contained in:
jonny 2021-06-17 11:32:59 +02:00
parent 318749e5a8
commit 702f4fe4c0

View File

@ -1,9 +1,7 @@
import type { GoToPageEvent } from '../Events/GoToPageEvent'; import type { GoToPageEvent } from '../Events/GoToPageEvent';
import type { OpenTabEvent } from '../Events/OpenTabEvent'; import type { OpenTabEvent } from '../Events/OpenTabEvent';
import { IframeApiContribution, sendToWorkadventure } from './IframeApiContribution'; import { IframeApiContribution, sendToWorkadventure } from './IframeApiContribution';
import {LoadPageEvent} from "../Events/LoadPageEvent";
import type { LoadPageEvent } from '../Events/LoadPageEvent';
class WorkadventureNavigationCommands extends IframeApiContribution<WorkadventureNavigationCommands> { class WorkadventureNavigationCommands extends IframeApiContribution<WorkadventureNavigationCommands> {
@ -32,16 +30,12 @@ class WorkadventureNavigationCommands extends IframeApiContribution<Workadventur
} }
goToRoom(url: string): void { goToRoom(url: string): void {
window.parent.postMessage({ sendToWorkadventure({
"type": 'loadPage', "type": 'loadPage',
"data": { "data": {
url url
} as LoadPageEvent }
<<<<<<< Updated upstream });
},'*');
=======
},'*');
>>>>>>> Stashed changes
} }
} }