Function js::jsapi::JS_ResolveStandardClass
[−]
[src]
pub unsafe extern "C" fn JS_ResolveStandardClass(
cx: *mut JSContext,
obj: HandleObject,
id: HandleId,
resolved: *mut bool
) -> bool
Resolve id, which must contain either a string or an int, to a standard class name in obj if possible, defining the class's constructor and/or prototype and storing true in *resolved. If id does not name a standard class or a top-level property induced by initializing a standard class, store false in *resolved and just return true. Return false on error, as usual for bool result-typed API entry points.
This API can be called directly from a global object class's resolve op, to define standard classes lazily. The class's enumerate op should call JS_EnumerateStandardClasses(cx, obj), to define eagerly during for..in loops any classes not yet resolved lazily.