pub unsafe extern "C" fn JS_ResolveStandardClass(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    id: Handle<PropertyKey>,
    resolved: *mut bool
) -> bool
Expand description

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 should either have an enumerate hook that calls JS_EnumerateStandardClasses, or a newEnumerate hook that calls JS_NewEnumerateStandardClasses. newEnumerate is preferred because it’s faster (does not define all standard classes).