Iirc correctly this was something that was supported in some fashion at
least. All code patterns that embind recognizes should be diligently tested
in https://github.com/kripken/emscripten/tree/master/tests/embind, try
seeing if there is an example that does what you are looking for. Perhaps
you'll need to delay the manual mods to the prototype until after the
registration has been done, which typically occurs in a global/static data
initializer in C/C++ startup.

2016-06-27 16:56 GMT+03:00 Alexandre Perrot <[email protected]>:

> Hello,
>
> I would like to know if there is a way to add methods implemented in js to
> classes generated with embind.
>
> Using a --post-js file, I can write :
>
> Module.MyClass.prototype.myfunction = ...
>
> But Module.MyClass is undefined at this point.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to