ddnet/other/emscripten/minimal.html

45 lines
1,003 B
HTML
Raw Normal View History

2022-03-25 08:26:37 +00:00
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
.game {
position: absolute;
top: 0px;
left: 0px;
margin: 0px;
border: 0;
width: 100%;
height: 100%;
overflow: hidden;
display: block;
}
</style>
</head>
<body>
2022-10-25 16:51:56 +00:00
<canvas class="game" id="canvas" width="100%" height="100%" oncontextmenu="event.preventDefault()"></canvas>
2022-03-25 08:26:37 +00:00
<p id="output"></p>
<script>
var Module = {
print: (function() {
var element = document.getElementById('output');
return function(text) {
element.innerHTML += text + "<br>";
};
})(),
printErr: function(text) {
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
if (0) {
dump(text + '\n');
}
},
canvas: (function() {
var canvas = document.getElementById('canvas');
return canvas;
})()
};
</script>
<script src="DDNet.js"></script>
</body>
</html>