Closed
Bug 1248367
Opened 10 years ago
Closed 10 years ago
typeof(HTMLObjectElement instance) should return object not function
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: abbGZcvu_bugzilla.mozilla.org, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
170 bytes,
text/html
|
Details |
The below HTML/JavaScript is expected to output "object" for the line containing "typeof o". It returns "function" instead.
<!DOCTYPE html>
<script>
var o = document.createElement("object");
console.log(o);
console.log(Object.getPrototypeOf(o));
console.log(typeof o);
</script>
Comment 1•10 years ago
|
||
<https://tc39.github.io/ecma262/#sec-typeof-operator-runtime-semantics-evaluation> checks for [[Call]].
<http://heycam.github.io/webidl/#call> defines objects with legacy callers have [[Call]].
<https://html.spec.whatwg.org/multipage/#htmlobjectelement> defines that HTMLObjectElement has a legacy caller.
-> our behaviour is correct.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•