Function script::dom::bindings::import::module::jsapi::JS::IsArray

source ·
pub unsafe extern "C" fn IsArray(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    isArray: *mut bool,
) -> bool
Expand description

ES6 7.2.2.

Returns false on failure, otherwise returns true and sets |*isArray| indicating whether the object passes ECMAScript’s IsArray test. This is the same test performed by |Array.isArray|.

This is NOT the same as asking whether |obj| is an Array or a wrapper around one. If |obj| is a proxy created by |Proxy.revocable()| and has been revoked, or if |obj| is a proxy whose target (at any number of hops) is a revoked proxy, this method throws a TypeError and returns false.