We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
$JSEvents
MINIMAL_RUNTIME
1 parent 2a38f3b commit 507b455Copy full SHA for 507b455
src/lib/libwebgl.js
@@ -1179,11 +1179,13 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
1179
if (GL.currentContext === GL.contexts[contextHandle]) {
1180
GL.currentContext = null;
1181
}
1182
+#if !MINIMAL_RUNTIME
1183
if (typeof JSEvents == 'object') {
1184
// Release all JS event handlers on the DOM element that the GL context is
1185
// associated with since the context is now deleted.
1186
JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);
1187
1188
+#endif
1189
// Make sure the canvas object no longer refers to the context object so
1190
// there are no GC surprises.
1191
if (GL.contexts[contextHandle]?.GLctx.canvas) {
0 commit comments