gen_js_api
gen_js_api copied to clipboard
Inherit JS class, override method and pass new class back to JS?
It's possible to wrap JS class with OCaml one, and it's possible to have some other OCaml class inherit from that base JS class and provide alternative implementation for some methods (which is the point of, well, subclassing). From the documentation it's not clear if it's possible to have that inherited class passed back to JS, so that my overriden methods will get called when JS calls corresponding methods of JS class? 🤔
Seems that virtual classes are not accepted by gen_js_api 😞