Yes, I was able to fix it with that as I mentioned above. Are you able to explain this a bit further? When doing it with just “this.foo” I assume passing the method messes things up as it is an instance of a class method. Does using the anonymous function to copy the class method remove the “instance” of it?
When you use the anonymous function, you are passing a function that calls the method on the instance of the class instead of the method itself. The reason that you can’t pass the method directly is because of how we generate code; methods are emitted differently than functions (we use vtables).