Description
JS_InstanceOf determines if a specified JS object, obj , has a JS class struct, clasp . If the object's internal class pointer corresponds to clasp , this function returns JS_TRUE , indicating that the object is an instance of the class. Otherwise, JS_InstanceOf returns JS_FALSE .
If you pass a non-null argument vector, argv , to JS_InstanceOf , and obj is not an instance of clasp , this function may report a class mismatch before returning. To do so, JS_InstanceOf tests whether or not there is a function name associated with the argument vector, and if there is, reports the name in an error message using the JS_ReportError function.
|