workadventure/front/src/Api/Events
David Négrier 5b4a72ea1f Add new "query/answer" utility functions for the scripting API
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.
2021-07-02 16:49:22 +02:00
..
ui Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
ButtonClickedEvent.ts Adding button clicked handling 2021-03-09 18:05:07 +01:00
ChatEvent.ts Adding ability to listen to user types chat messages using WA.onChatMessage 2021-03-06 15:26:07 +01:00
ClosePopupEvent.ts Adding a Popup object with a close() method on it. 2021-03-09 18:51:30 +01:00
DataLayerEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
EnterLeaveEvent.ts Adding the abaility to track users entering/leaving a zone in the script language. 2021-03-08 18:58:38 +01:00
GameStateEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
GoToPageEvent.ts Popup openWebSite 2021-03-25 17:12:53 +01:00
HasPlayerMovedEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
IframeEvent.ts Add new "query/answer" utility functions for the scripting API 2021-07-02 16:49:22 +02:00
LayerEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
LoadPageEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
LoadSoundEvent.ts Sound in Script Done 2021-04-23 15:35:34 +02:00
OpenCoWebSiteEvent.ts Merge branch 'develop' of github.com:thecodingmachine/workadventure into jonnytest1-tiles-start-positions 2021-07-02 14:35:28 +02:00
OpenPopupEvent.ts Removing closeOnClick as it is not implemented 2021-03-09 18:57:25 +01:00
OpenTabEvent.ts Popup openWebSite 2021-03-25 17:12:53 +01:00
PlaySoundEvent.ts parameter soundConfig is now optionnal 2021-04-23 17:03:17 +02:00
setPropertyEvent.ts Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
SetTilesEvent.ts Merge branch 'develop' of github.com:thecodingmachine/workadventure into jonnytest1-tiles-start-positions 2021-07-02 14:35:28 +02:00
StopSoundEvent.ts Sound in Script Done 2021-04-23 15:35:34 +02:00
UserInputChatEvent.ts Adding ability to listen to user types chat messages using WA.onChatMessage 2021-03-06 15:26:07 +01:00