Hi,
Could you please confirm if my understanding is correct. In KJS there
is JSObject's method - getOwnPropertySlot()

Would this be a correct replacement of it for v8?

    v8::Handle<v8::FunctionTemplate> ft = v8::FunctionTemplate::New();
    ft->SetClassName(v8::String::New("myobj"));
    ft->InstanceTemplate()->SetNamedPropertyHandler(PropertyHandler);
    ...

static v8::Handle<v8::Value> PropertyHandler(v8::Local<v8::String>
propname, const v8::AccessorInfo& info) {

    if (propname->Equals(v8::String::New("my_prop_A")))   {
        ...
    } else {

        return info.This()-
>GetRealNamedPropertyInPrototypeChain(propname);
    }
}

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

Reply via email to