partey_workadventure/maps/tests/Metadata/customMenu.html
GRL f3c4d344b3 Add iframe submenu by scripting API
Delete menu by scripting API
2021-08-24 17:35:06 +02:00

18 lines
661 B
HTML

<!doctype html>
<html lang="en">
<head>
<script>
var script = document.createElement('script');
// Don't do this at home kids! The "document.referrer" part is actually inserting a XSS security.
// We are OK in this precise case because the HTML page is hosted on the "maps" domain that contains only static files.
script.setAttribute('src', document.referrer + 'iframe_api.js');
document.head.appendChild(script);
window.addEventListener('load', () => {
WA.ui.registerMenuIframe('test', 'customIframeMenu.html');
})
</script>
</head>
<body>
<p>Add a custom menu</p>
</body>
</html>