typeof returning “unknown” in IE

According to a duplicate question at Bytes, the typeof value unknown is added to JScript version 8, along with date.

A comment to a blog by Robert Nyman can also be explanatory:

Internet Explorer displays “unknown” when the object in question is on
the other side of a COM+ bridge. You may not know this or realize
this, but MS’s XMLHTTP object is part of a different COM+ object that
implements IUnknown; when you call methods on it, you’re doing so over
a COM bridge and not calling native JavaScript.

Basically that’s MS’s answer if you try to test or access something
that’s not a true part of the JScript engine.

Leave a Comment