Closed GoogleCodeExporter closed 8 years ago
For this behaviour to work you also need to tell the class binding mechanism
that it should check the JS prototype chain for the "this" object. In the
ClassCreator you can do this by adding the following template:
namespace cvv8 {
template <>
struct ClassCreator_SearchPrototypeForThis<MyType> : Opt_Bool<true>
{};
}
Actually... the default impl of this class uses "true", which implies that i
might have broken this.
If i'm not mistaken, you also need the horribly ugly workaround described here:
http://code.google.com/p/v8-juice/wiki/ClassBinderPartTwo#Inheriting_Native_Clas
ses_from_JS
Original comment by sgbeal@googlemail.com
on 20 Feb 2012 at 5:41
It works with your 'horrible workaround'. Though that is incompatible to
CoffeeScript, which is kind of said. Any chance of that getting fixed? :-/
Original comment by korz.nik...@gmail.com
on 20 Feb 2012 at 5:56
i don't know _how_ to fix it :/. The only workaround i've ever found which
works (in the sense that (this instanceof TheNative) works) is that ugly
workaround. If you've got any ideas on how to solve it i'd love to hear them.
Original comment by sgbeal@googlemail.com
on 20 Feb 2012 at 6:04
Original comment by sgbeal@googlemail.com
on 29 Apr 2012 at 1:49
Original issue reported on code.google.com by
korz.nik...@gmail.com
on 20 Feb 2012 at 11:58