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

extends in webinterop #747

Open
Sharktheone opened this issue Dec 30, 2024 · 0 comments
Open

extends in webinterop #747

Sharktheone opened this issue Dec 30, 2024 · 0 comments
Labels
javascript api Any issues related to our API interaction with the javascript engine javascript Any issues related to JavaScript

Comments

@Sharktheone
Copy link
Member

We need some system, so we can use some kind of extends in the scripting part.

Internally, this will just be a field that holds the struct we want to extend from. For example, if we have a UIEvent struct that we pass to js/Lua we will have a field event or parent with a Event. When creating the bindings, the Event's implement function will be executed before the UIEvents, which leads to the fields on the Object being correctly instantiated for all struct/classes we that we inherit from.

However, there needs to be a slightly different function, so we can also modify the Object's prototype accordingly.

@Sharktheone Sharktheone added javascript Any issues related to JavaScript javascript api Any issues related to our API interaction with the javascript engine labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript api Any issues related to our API interaction with the javascript engine javascript Any issues related to JavaScript
Projects
Status: No status
Development

No branches or pull requests

1 participant