eb93a04341
Adds a first version of an API to communicate between an iFrame opened by WorkAdventure and WorkAdventure itself. The first API method is a method allowing to add messages in the chat, from the iFrame. Comes with a test file.
18 lines
441 B
HTML
18 lines
441 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="http://play.workadventure.localhost/iframe_api.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<button id="sendchat">Send chat message</button>
|
|
<script>
|
|
document.getElementById('sendchat').onclick = () => {
|
|
WA.sendChatMessage('Hello world!', 'Mr Robot');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|