gen_js_api icon indicating copy to clipboard operation
gen_js_api copied to clipboard

Inherit JS class, override method and pass new class back to JS?

Open Lupus opened this issue 4 years ago • 1 comments

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? 🤔

Lupus avatar Sep 30 '21 06:09 Lupus

Seems that virtual classes are not accepted by gen_js_api 😞

Lupus avatar Sep 30 '21 06:09 Lupus