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

Document the prototype.valueOf() usage to get pointer from class instance in JS. #41

Open
forcepusher opened this issue Jan 24, 2021 · 2 comments

Comments

@forcepusher
Copy link

As seen in this issue, it's not really apparent that we can use the valueOf() method to convert a class view into a pointer. I can't find any references to it in the manual, neither the info that it's being automatically converted into a pointer when using __retain(), __release() methods and such.

@dcodeIO
Copy link
Member

dcodeIO commented Jan 24, 2021

Do you have thoughts on where and how to document the behavior ideally?

@forcepusher
Copy link
Author

forcepusher commented Jan 24, 2021

I think somewhere around this area. It could also cover the usage of the new constructor as seen here.
Regarding how exactly to document it - I'm not sure, I've only recently found it myself.
But I think we could just document that same test case.

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

2 participants