Files
imgui/examples/libs/emscripten/shell_minimal.html
Yan Pujante 512982d0d2 Examples: Emscripten: fixes minor rendering issues (#9281)
- in Firefox, scrollbar would appear => adding overflow: hidden fixes this issue
- when the canvas has the focus, Chrome draws a very small blue outline, setting it to none fixes this issue
2026-03-09 16:54:21 +01:00

2.3 KiB

<html lang="en-us"> <head> <style> body { margin: 0; background-color: black; overflow: hidden; } /* FIXME: with our GLFW example this block seems to break resizing and io.DisplaySize gets stuck */ .emscripten { position: absolute; top: 0px; left: 0px; margin: 0px; border: 0; width: 100%; height: 100%; overflow: hidden; display: block; image-rendering: optimizeSpeed; image-rendering: -moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; } #canvas:focus { outline: none; } </style> </head> <script type='text/javascript'> var Module = { preRun: [], postRun: [], print: (function() { return function(text) { text = Array.prototype.slice.call(arguments).join(' '); console.log(text); }; })(), printErr: function(text) { text = Array.prototype.slice.call(arguments).join(' '); console.error(text); }, canvas: (function() { var canvas = document.getElementById('canvas'); //canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false); return canvas; })(), setStatus: function(text) { console.log("status: " + text); }, monitorRunDependencies: function(left) { // no run dependencies to log } }; window.onerror = function() { console.log("onerror: " + event); }; </script> {{{ SCRIPT }}} </html>