Function script::dom::bindings::import::module::JS_ForwardGetPropertyTo

source ·
pub unsafe extern "C" fn JS_ForwardGetPropertyTo(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    id: Handle<PropertyKey>,
    receiver: Handle<Value>,
    vp: MutableHandle<Value>,
) -> bool
Expand description

Get the value of the property obj[id], or undefined if no such property exists. This is the C++ equivalent of vp = Reflect.get(obj, id, receiver).

Most callers don’t need the receiver argument. Consider using JS_GetProperty instead. (But if you’re implementing a proxy handler’s set() method, it’s often correct to call this function and pass the receiver through.)

Implements: ES6 [[Get]] internal method.