My question is simple, How do you define the behavior of assignment operator in v8 / Node.js?
Assume I have a class in C++ domain that have a set method. Normally when I write this JS:
var jsInstance = new CppWrappedClass(params1);
jsInstance = new CppWrappedClass(params2);
The second call to new CppWrappedClass(...) totally replaces the contents of jsInstance with the new one. What I would want to achieve is that when the second call happens, in its C++ backend, my set method gets called. Aka I define the behavior of assignment operator.
Is this even possible?