Last active
May 15, 2020 08:24
-
-
Save yuri91/ea1891839f2f75e005a2cda619e0dd8e to your computer and use it in GitHub Desktop.
Basic example: pass anyref as parameter and return value
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> | |
namespace [[cheerp::genericjs]] client { | |
void jsFunc(client::Element* elem); | |
} | |
[[cheerp::wasm]] | |
[[cheerp::jsexport]] | |
client::Element* passAndReturn(client::Element* elem) | |
{ | |
jsFunc(elem); | |
return elem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment