Subj : Re: GC Question To : MA From : Brendan Eich Date : Thu Jun 10 2004 02:37 pm MA wrote: > I have always wanted to stuff an array in resolve hook, but I dont > know how to replace the default resolver function of a *particular* > array (created with JS_NewArrayObject())with my own resolver function. You would have to make your own array-like object using a custom JSClass. > I could create a new special array class, but then I will have to > duplicate all the functionality that is already there in the > present array implementation. Not so! The Array methods are generic, they work on any class of object, so long as it has a length property. You could therefore make your native class delegate to Array.prototype (by passing that object as the non-null parent_proto to your JS_InitClass call). /be .