Last active
May 15, 2020 09:43
-
-
Save yuri91/431417d404dede95be9b8cd1728dc3eb to your computer and use it in GitHub Desktop.
Access client globals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cheerp/client.h> | |
[[cheerp::wasm]] | |
[[cheerp::jsexport]] | |
client::Element* global(const char* cl) | |
{ | |
client::String* clJS = new client::String(cl); | |
client::Element* elem = client::document.createElement("div"); | |
elem->set_className(*clJS); | |
return elem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment