Function mozjs::jsapi::GetBuiltinClass
source · pub unsafe extern "C" fn GetBuiltinClass(
cx: *mut JSContext,
obj: Handle<*mut JSObject>,
cls: *mut ESClass,
) -> bool
Expand description
Determine the ECMAScript “class” – Date, String, RegExp, and all the other builtin object types (described in ECMAScript in terms of an objecting having “an [[ArrayBufferData]] internal slot” or similar language for other kinds of object – of the provided object.
If this function is passed a wrapper that can be unwrapped, the determination is performed on that object. If the wrapper can’t be unwrapped, and it’s not a wrapper that prefers to treat this operation as a failure, this function will indicate that the object is |js::ESClass::Other|.