Too fancy. I've settled on a classic "import" function, which is a  
slight modification of load() from the examples:
     import("somefunctionality.js")
Also because JavaScript classes are easily extended on-the-fly, so you  
are likely to end up intercepting every method call ;)

-- 

        V

On Nov 11, 2008, at 2:30 PM, vlad florentino wrote:
> Is it possible to create some sort of class autoload mechanism in V8?
> I'm thinking that if it's possible to get a callback when something  
> is being "new"ed in V8, then it would be possible to call some  
> Javascript function with the name of the class currently being  
> instantiated. That Javascript function could be overwritten to  
> provide a user-defined autoload system.
> Is it possible to intercept calls to the "new Class()" statement?
> Is there any other method to implement a class autoload system.


--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to