Skip to content

fix: allowing fullscreen on chromium based browsers#5601

Open
moaz-karam wants to merge 1 commit intoraysan5:masterfrom
moaz-karam:chromium-fullscreen
Open

fix: allowing fullscreen on chromium based browsers#5601
moaz-karam wants to merge 1 commit intoraysan5:masterfrom
moaz-karam:chromium-fullscreen

Conversation

@moaz-karam
Copy link

This PR allows the full-screen button to open on chromium based browsers

@maiconpintoabreu
Copy link
Contributor

@moaz-karam requestFullScreen receives 2 args, you can see here: https://github.com/emscripten-core/emscripten/blob/af01558779231dcf3524438e904b688a5576432c/src/lib/libbrowser.js#L218
Maybe you are using a old version of emscripten.

@moaz-karam
Copy link
Author

@moaz-karam requestFullScreen receives 2 args, you can see here: https://github.com/emscripten-core/emscripten/blob/af01558779231dcf3524438e904b688a5576432c/src/lib/libbrowser.js#L218 Maybe you are using a old version of emscripten.

I am using the latest version of the emsdk and requestFullscreen(false, false) works well on Firefox, but fails on Chrome unless the args are removed.

@maiconpintoabreu
Copy link
Contributor

@moaz-karam I can replicate the issue as well now, never saw it before.

@aceiii
Copy link
Contributor

aceiii commented Feb 27, 2026

The current documentation shows that it's using Module.requestFullscreen() and NOT Module.canvas.requestFullscreen(): https://github.com/emscripten-core/emscripten/blob/main/html/shell_minimal.html

What you see here gets exported when you add requestFullscreen to the EXPORTED_RUNTIME_METHODS link options. I've tested this out on my own code and it works with both Firefox and Chrome when you call this instead one from Module instead of the one from Module.canvas.

Edit: Also noticed the hide/lock pointer didn't actually work before on Firefox but this fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants