Type Alias mozjs_sys::jsapi::JSResolveOp

source ·
pub type JSResolveOp = Option<unsafe extern "C" fn(cx: *mut JSContext, obj: HandleObject, id: HandleId, resolvedp: *mut bool) -> bool>;
Expand description

Resolve a lazy property named by id in obj by defining it directly in obj. Lazy properties are those reflected from some peer native property space (e.g., the DOM attributes for a given node reflected as obj) on demand.

JS looks for a property in an object, and if not found, tries to resolve the given id. *resolvedp should be set to true iff the property was defined on |obj|.

Aliased Type§

enum JSResolveOp {
    None,
    Some(unsafe extern "C" fn(_: *mut JSContext, _: Handle<*mut JSObject>, _: Handle<PropertyKey>, _: *mut bool) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut JSContext, _: Handle<*mut JSObject>, _: Handle<PropertyKey>, _: *mut bool) -> bool)

Some value of type T.