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

RESOLVED DUPLICATE of bug 268945

Status

()

defect
RESOLVED DUPLICATE of bug 268945
13 years ago
13 years ago

People

(Reporter: mozilla, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

13 years ago
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"

Comment 1

13 years ago

*** This bug has been marked as a duplicate of 268945 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 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.