Commit graph

9 commits

Author SHA1 Message Date
jonny 369d453455 Merge remote-tracking branch 'remotes/upstream/develop' into trigger-message-refv3 2021-07-02 18:49:22 +02:00
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
David Négrier 9129ceede1 Improving refactoring of API following @jonnytest1 feedback 2021-06-21 11:48:39 +02:00
David Négrier 34dc5a0bc6 Refactoring WorkAdventureAPI.
Simplifying a lot what was done (even if the new code is a bit less automated, it allows to list exactly the methods we want to see deprecated and to add a notification message)
2021-06-18 17:22:56 +02:00
jonny 8a1376e966 refactored to key based types 2021-05-28 02:28:11 +02:00
jonny ab631c5dc4 register callbacks
should be done now
2021-05-28 01:46:08 +02:00
jonny fd5b598b63 Bubble [WIP] (still need to do the javascript part) 2021-05-28 01:18:00 +02:00
jonny 540e5783b6 cowebsite
navigation
sound
player
extraction
2021-05-28 01:14:10 +02:00
jonny 2de2d114a1 added typedef for subobject types
extracted popup functions

# Conflicts:
#	front/package-lock.json
#	front/package.json
#	front/src/iframe_api.ts
2021-05-28 00:30:51 +02:00