Adding maps for test metadata
Documentation of metadata functions/methods
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user