diff --git a/src/sys/sdl3/sdl3_backend.cpp b/src/sys/sdl3/sdl3_backend.cpp
index 9128a3d..c4f1e72 100644
--- a/src/sys/sdl3/sdl3_backend.cpp
+++ b/src/sys/sdl3/sdl3_backend.cpp
@@ -5321,5 +5321,11 @@ bool GLimp_Init(glimpParms_t parms) {
 	const char *driverName;
 
+#if defined(__EMSCRIPTEN__)
+	if (!SDL_SetHint(SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR, "#gameCanvas")) {
+		common->Printf("SDL3: could not select the browser render canvas\n");
+		return false;
+	}
+#endif
 	common->Printf("Initializing OpenGL subsystem (SDL3 backend)\n");
 	SDL3_SetMouseHintDefaults();
 	SDL3_SetVideoHintDefaults();
