#how to focus game in browser?
1 messages · Page 1 of 1 (latest)
please!
It was already kind of answered, but it's to do with WASM export
There's some code we have for obtaining focus on websites that aren't gx.games (since you can export them now with zip)
when i export my gx.games as a zip
i have to add this script at the end to be able to gain focus on it
<script>
var bodyElement = document.getElementById("canvas");
bodyElement.addEventListener("click", function() {
bodyElement.focus();
});
</script>
i believe the index files are identical, at least for the current run-time. So i keep this ready, and replace the index in the zip i export with this