Replies: 1 comment 3 replies
|
Sure, we can add a note in the class documentation. Unfortunately, the concept of |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I was working on my project and I found that the methods are not bound to the instances. This means that in a snippet like
mwill be different between the callsobj.method()andf(), with a behavior similar to what happen withthisin javascript.While, in retrospective, it was obvious looking at how the
.brsis compiled, I would suggest to add some explicit note on the classes documentation (maybe it's me, but I didn't find any reference about it, and naively I expected to work with a more common scope resolution).BTW: is there a way to force the value of
m? something like the js.bind()functionAll reactions