Closed
Bug 293546
Opened 19 years ago
Closed 19 years ago
No way to do "a instanceof b" using the JS API.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jst, Assigned: shaver)
Details
Attachments
(1 file)
1.13 KB,
patch
|
brendan
:
review+
brendan
:
superreview+
brendan
:
approval1.8b2+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•19 years ago
|
||
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.
Attachment #183102 -
Flags: superreview?(brendan)
Attachment #183102 -
Flags: review?(jst)
Comment 2•19 years ago
|
||
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
Attachment #183102 -
Flags: superreview?(brendan)
Attachment #183102 -
Flags: superreview+
Attachment #183102 -
Flags: review?(jst)
Attachment #183102 -
Flags: review+
Attachment #183102 -
Flags: approval1.8b2+
Reporter | ||
Comment 3•19 years ago
|
||
Oh, and this does indeed do exactly what I wanted. Thanks for the quick fix!
Reporter | ||
Comment 4•19 years ago
|
||
This was already checked in. Marking FIXED.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: testcase-
You need to log in
before you can comment on or make changes to this bug.
Description
•