Subj : Re: Checking JSObject class type To : netscape.public.mozilla.jseng From : Brian Genisio Date : Mon Jan 26 2004 10:59 am Sterling Bates wrote: > "Brian Genisio" wrote in message > news:40152515$1@10.10.0.241... > >>Hi all, >> >>What is the best way to tell what class a JSObject is? This is the best >>way I have figured out, but it seemes there must be a quicker way... >> >>strcmp(JS_GetClass(new_obj)->name, classSpec.name) > > > Could you use > > JS_GetClass(new_obj) == classSpec > > ? > > Sterling > > Well, I suppose I can do that, but I would have to define an "==" operator, which would have to consist of a check of the name value, in addition to everything else... I am not sure that that would give me anything. Brian .