5b4a72ea1f
So far, the scripting API was using events to communicate between WA and the iFrame. But often, the scripting API might actually want to "ask" WA a question and wait for an answer. We dealt with this by using 2 unrelated events (in a mostly painful way). This commit adds a "queryWorkadventure" utility function in the iFrame API that allows us to send a query, and to wait for an answer. The query and answer events have a unique ID to be sure the answer matches the correct query. On the WA side, a new `IframeListener.registerAnswerer` method can be used to register a possible answer. |
||
---|---|---|
.. | ||
ui | ||
ButtonClickedEvent.ts | ||
ChatEvent.ts | ||
ClosePopupEvent.ts | ||
DataLayerEvent.ts | ||
EnterLeaveEvent.ts | ||
GameStateEvent.ts | ||
GoToPageEvent.ts | ||
HasPlayerMovedEvent.ts | ||
IframeEvent.ts | ||
LayerEvent.ts | ||
LoadPageEvent.ts | ||
LoadSoundEvent.ts | ||
OpenCoWebSiteEvent.ts | ||
OpenPopupEvent.ts | ||
OpenTabEvent.ts | ||
PlaySoundEvent.ts | ||
setPropertyEvent.ts | ||
SetTilesEvent.ts | ||
StopSoundEvent.ts | ||
UserInputChatEvent.ts |