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