workadventure/front/src/Api/iframe
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
..
Sound Splitting classes in separated files 2021-06-21 12:26:12 +02:00
Ui Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
chat.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00
controls.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00
IframeApiContribution.ts Add new "query/answer" utility functions for the scripting API 2021-07-02 16:49:22 +02:00
nav.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00
player.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00
registeredCallbacks.ts Improving refactoring of API following @jonnytest1 feedback 2021-06-21 11:48:39 +02:00
room.ts Add new "query/answer" utility functions for the scripting API 2021-07-02 16:49:22 +02:00
sound.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00
ui.ts Fixing NPM package generation 2021-06-30 10:15:55 +02:00