PS: If the tone sounds a little harsh, that was not my intent. Sorry for that.
Currently when you export to HTML5, you get a sample/template html file with the data.
I have to say that this html has a lot of errors (especially closing tags that close nothing) and js part seems to be written in a hurry.
I have rewritten the js and html for my own taste, including the Module component. But when I tried to run the html, I also found that there is a dependency for the “fullscreen” button that appears in the template. Everything is deletable except this button. Removing the dependency is impossible for the developer as the code is precompiled + obfuscated + etc by emscripten…
If I’m correct, when UE4 is exporting the game code via emscripten, it imports another js file which includes the game + graphics engine for webgl. In there somewhere, someone forgot to add a check for existence of the button with id “fullscreen_request”. As there is no “undefined/null” check, when the code hits, this error is thrown:
exception thrown: TypeError: Cannot read property 'addEventListener' of null,TypeError: Cannot read property 'addEventListener' of null
at Object.JSEvents.registerOrRemoveHandler (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:1:44174)
at Object.JSEvents.registerMouseEventCallback (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:1:47948)
at _emscripten_set_click_callback (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:1:323575)
at GbM (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:12:1099387)
at o8L (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:12:1024521)
at A4L (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:12:946409)
at Array.NbM (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:12:1100143)
at UZA (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:31:828251)
at SZA (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:31:827899)
at tB (blob:http%3A//xxx.xxx.xxx.xxx/4b1846e7-c655-4667-a3b0-5bbee1527377:24:161891)
If you can point me to these js files (if not obfuscated) I can remove the fullscreen button dependency and request a merge from Github.