emscripten-core / emscripten-core/emscripten
Uncaught TypeError in setCanvasElementSizeCallingThread
- Lenguaje dominante
- C++
- Estrellas
- 27.6k
- Forks
- 3.6k
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 109
Descripción
The error says
`Uncaught TypeError: Cannot read properties of null (reading '0')`
The error comes from the code below.
```js
var autoResizeViewport = false;
if (canvas.GLctxObject && canvas.GLctxObject.GLctx) {
var prevViewport = canvas.GLctxObject.GLctx.getParameter(2978);
autoResizeViewport =
prevViewport[0] === 0 &&
prevViewport[1] === 0 &&
prevViewport[2] === canvas.width &&
prevViewport[3] === canvas.height;
}
```
It seems prevViewport is 0.
I'm not really familiar with the js side. Is the js file that contains `setCanvasElementSizeCallingThread` generated by emsdk? I'm not sure if this is an emsdk issue or a user issue.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.