[HTML5] Implement Godot <-> JavaScript interface. #48719
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
4.0
version of: #48691 .The API is the same, with the exception of
JavaScript.create_callback
which now takes a callable (first line below):Not really easy to test in current
master
, but you can build the thread version:scons p=javascript target=release_debug threads_enabled=yes
And check the console. If the startup get stuck, try editing
platform/javascript/js/libs/library_godot_os.js
and havegodot_js_os_hw_concurrency_get
always return 2 (otherwise Godot will spawn to many threads and crash your browser).