Adding maps for test metadata
Documentation of metadata functions/methods
This commit is contained in:
parent
ce0a72c6ce
commit
96545c618a
16 changed files with 1571 additions and 59 deletions
42
maps/tests/Metadata/getGameState.html
Normal file
42
maps/tests/Metadata/getGameState.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="http://play.workadventure.localhost/iframe_api.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<button id="getNickName">nickname</button>
|
||||
<div id="nickname"></div>
|
||||
|
||||
<button id="getRoomID">roomID</button>
|
||||
<div id="roomID"></div>
|
||||
|
||||
<button id="getUUID">UUID</button>
|
||||
<div id="UUID"></div>
|
||||
|
||||
<script>
|
||||
document.getElementById('getNickName').onclick = () => {
|
||||
WA.getNickName().then((res) => {
|
||||
const nickNameDiv = document.createElement('p');
|
||||
nickNameDiv.innerText = res;
|
||||
document.getElementById('nickname').append(nickNameDiv);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('getUUID').onclick = () => {
|
||||
WA.getUuid().then((res) => {
|
||||
const uuidDiv = document.createElement('p');
|
||||
uuidDiv.innerText = res;
|
||||
document.getElementById('UUID').append(uuidDiv);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('getRoomID').onclick = () => {
|
||||
WA.getRoomId().then((res) => {
|
||||
const roomidDiv = document.createElement('p');
|
||||
roomidDiv.innerText = res;
|
||||
document.getElementById('roomID').append(roomidDiv);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue