Closed Bug 346789 Opened 19 years ago Closed 19 years ago

In JavaScript, typeof on an HTMLObjectElement object returns "function" instead of "object".

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 268945

People

(Reporter: mozilla, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 In JavaScript, typeof on an HTMLObjectElement object returns "function", which is incorrect. This happens in both Firefox for Linux and Firefox for Windows. Here's a simple HTML page that demonstrates the error: =========================================== <html> <body> <script> var n= document.createElement('object') ; alert('n=['+n+']\ntypeof n=['+(typeof n)+']') ; </script> </body> </html> =========================================== Reproducible: Always Steps to Reproduce: 1. Create and load the (short) sample HTML page above, in the "Details" section. 2. Notice that the alert() shows that "typeof n" evaluates to "function" instead of "object". Actual Results: typeof n=="function" Expected Results: typeof n=="object"
*** This bug has been marked as a duplicate of 268945 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.