Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JSHasInstanceOp

This article needs a technical review. How you can help.

JSHasInstanceOp is the type of JSClass.hasInstance.

Syntax

typedef bool
(* JSHasInstanceOp)(JSContext *cx, JS::HandleObject obj, JS::MutableHandleValue vp,
                    bool *bp);
Name Type Description
cx JSContext * The JS context in which the type check is occurring.
obj JS::HandleObject The "type" in the type check.
v JS::MutableHandleValue The value whose type is being checked.
bp bool * Out parameter. On success, the callback stores the result of the type check in *bp.

Description

JSHasInstanceOp is called to check whether v is an instance of obj. Return false on error or exception, true on success with true in *bp if v is an instance of obj, false in *bp otherwise.

JSClass hooks

JSClass offers the following hook:

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,