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)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: abbGZcvu_bugzilla.mozilla.org, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

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>
Keywords: crash
<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
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: