emscripten-core / emscripten-core/emscripten
Uncaught TypeError in setCanvasElementSizeCallingThread
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 6h
- PR unite (30g)
- 109
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.