We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb3e744 commit 7e02c31Copy full SHA for 7e02c31
SampleBase/src/Emscripten/resources/emscripten_template.html
@@ -32,11 +32,15 @@
32
</style>
33
</head>
34
<body>
35
- <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
+ <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
36
<script type='text/javascript'>
37
var Module = {
38
preRun: [],
39
- postRun: [],
+ postRun: function() {
40
+ var canvas = document.getElementById('canvas');
41
+ if (canvas)
42
+ canvas.focus();
43
+ },
44
print: (function () {
45
return function (text) {
46
text = Array.prototype.slice.call(arguments).join(' ');
0 commit comments