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

[Suggestion] Features for ox_lib callback functions #572

Open
emanueldev1 opened this issue May 5, 2024 · 1 comment
Open

[Suggestion] Features for ox_lib callback functions #572

emanueldev1 opened this issue May 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@emanueldev1
Copy link

Option to obtain self in a callback which has the information of which resource invoked the callback and the possibility of making a private callback that can only be executed by the same resource

@emanueldev1 emanueldev1 added the enhancement New feature or request label May 5, 2024
@thelindat
Copy link
Member

thelindat commented May 5, 2024

Unlike this in JS you must explicitly pass self as an argument (using : is just sugar syntax). That would be a breaking change, requiring syntax changes and offsetting all parameters. As-is, callbacks don't even construct a table that could be used as self.

I have considered deprecating the current callbacks in favour of a more appropriately named RPC module, but no planning has been done on that front.

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

No branches or pull requests

2 participants