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

source ยท
pub unsafe extern "C" fn ObjectIsRegExp(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    isRegExp: *mut bool,
) -> bool
Expand description

On success, returns true, setting |*isRegExp| to true if |obj| is a RegExp object or a wrapper around one, or to false if not. Returns false on failure.

This method returns true with |*isRegExp == false| when passed an ES6 proxy whose target is a RegExp, or when passed a revoked proxy.