> ObjectTemplate::SetNamedPropertyHandler can set callback to intercept > all properties accession, now I want to intercept all methods by > calling ObjectTemplate::SetNamedMethodHandler, but there is NOT > similar method in ObjectTemplate. My object has many dynamic method, > and methods that owned by one object are not same with other object. > > Are there any alternative to it?
Given an object X with a method Y, your property handler for X needs to return a function when X.Y is requested. When the function Y is invoked, it can look at the Arguments.Holder() object. (or .This(), I have never been quite clear on the difference). The only thing missing is the name of the method being called. I am not sure how you would get that. -- Bryan White --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
