HTML5 Fullscreen Extension
Link to HTML5 Fullscreen Extension
NOTE: With the release of Gamemaker 2024.11, this extension will no longer be supported or updated, as Gamemaker is migrating to WASM and you can already build for HTML5 using the GX.Games exporter, and this includes native support for Fullscreen.
As you probably know, window_set_fullscreen() does not work on HTML5. So after searching online, I basically copy/pasted a small Javascript code for a GMS1 extension found in this forum post (full credit to the original author), in order to create a button that is added on top of the game canvas (I chose the bottom right corner but you can change that on the provided script), that lets you toggle full screen on or off. Check out the demo "game" above.