Conversation
… x__deps more to get better dead code elimination. Fixes emscripten-core#2999.
…SEvents object for better dead code elimination opportunities. emscripten-core#2999.
|
The intent of this is also to prepare for fixing issue #3283 by changing the built-in default shell.html to reuse the HTML5 functions so that the fullscreen button and the HTML5 API fullscreen request code will play nice together. However I'm not sure yet how to model a dependency between default |
|
I think if an HTML shell file depends on something, it would need to add it as used by adding it to |
|
This is a lot of refactoring that leads to what I worry is worse code - now there will be lots of small globals ( If we are sure that the code size benefits are worth it, how about if there is still a Another option is to rely on closure. Closure advanced can remove parts of objects, so it would do dead code elimination in the code before this pull. Another option is to add dependency management in emscripten to properties of objects, but that sounds complex. |
…y(), emscripten_enter_soft_fullscreen() and emscripten_exit_soft_fullscreen() which allow a more intelligent switch between fullscreen modes with different preset display modes. The original emscripten_request_fullscreen() is still available, and should be used in scenarios where it's desired that the html5.h layer should perform no changes whatsoever to the DOM tree.
|
Is this still important, @juj? |
|
This is not only important, but critical; though this PR that implements this removal has fallen out of date, so I'll close this out. In my fork november_2018 I've reimplemented this, but don't have time just now to submit a PR. |
This pull request removes the
JSEventsobject altogether insrc/library_html5.jsand replaces it with the use of explictx__depsdependency handling. This allows dead code elimination to remove a lot of unused functions when using the HTML5 events API. Also the functions are now prefixed with double underscores to clearly separate public and private APIs. This fixes #2999.