Hot to interact with DOM? #17588
krm441
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
The simplest way to make the work would be to export the Also if you are writing it in C++ you will need to mark it as Finally when can call a native function from JS you need to prefix it with a leading underscore. So that call would be |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have read all the possible tutorials and docs. But i still don't understand how i can use a simple html button to invoke some changes in my c++. For example:
<div><button onclick="jump()"> Button </button></div>
in C++;
inline void jump() { Player::GetInstance()->jump(); }
How can I do that?
Please forgive me; emscripten is a new area for me. I use glfw and on desktop it perfectly responds to all keys. But I need to create a GUI. So i thought that using html/css buttons will be a good idea.
Beta Was this translation helpful? Give feedback.
All reactions