SynopsisSet the value of a JavaScript return variable. Prototype#include "ej.h" void ejSetResult(int eid, char_t *s) Parameters
DescriptionThe ejSetResult procedure is used for C functions which have been mapped as an ej function returning some value. By making this call, the corresponding ej function will be passed to the result. All JavaScript variables are stored as strings. Return ValueNone EJ ExampleColor = getColor(); C Exampleinit ... ejSetGlobalFunction(eid, T("getColor"), ejGetColor); int ejGetColor(int eid, void *handle, int argc, char_t **argv) { ... ejSetResult(eid, "blue"); ... return 0; } See Also |