Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lupus opened this issue Sep 30, 2021 · 1 comment
Open

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

Lupus opened this issue Sep 30, 2021 · 1 comment

Comments

@Lupus
Copy link

Lupus commented Sep 30, 2021

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
Copy link
Author

Lupus commented Sep 30, 2021

Seems that virtual classes are not accepted by gen_js_api 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant