I've got two objects and I want to find out if one's an instance of the other. There's a JSClass hook that helps you implement this for your own classes, but there's no JS engine API to do that check.
Created attachment 183102 [details] [diff] [review] the obvious, trivial patch Comme ca? It wants a doc-comment explaining that it is the equivalent of the language |instanceof| construct, albeit with reversed operands, and that JS_InstanceOf trades in native classes only. We don't always get what we want, though.
Comment on attachment 183102 [details] [diff] [review] the obvious, trivial patch r/sr/a=me. No doc comment, instead add to js/docs/jsref.xml. /be
Oh, and this does indeed do exactly what I wanted. Thanks for the quick fix!
This was already checked in. Marking FIXED.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.