This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21670 - Clarify that typeof InterfaceObject should be "function"
Summary: Clarify that typeof InterfaceObject should be "function"
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard: [v1]
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 22:16 UTC by Erik Arvidsson
Modified: 2013-08-04 07:41 UTC (History)
2 users (show)

See Also:


Attachments

Description Erik Arvidsson 2013-04-11 22:16:12 UTC
Interface objects are Functions with a [[Call]] behavior that throws by default.

http://dev.w3.org/2006/webapi/WebIDL/#es-interface-call

Therefore typeof HTMLElement === "function".
Comment 1 Cameron McCormack 2013-04-11 22:38:06 UTC
That should already be required, since http://dev.w3.org/2006/webapi/WebIDL/#interface-object says that the interface object is a function object, and http://dev.w3.org/2006/webapi/WebIDL/#dfn-function-object describes those.  (It has some out of date ES6 terminology that needs updating, but hopefully it is still clear.)
Comment 2 Cameron McCormack 2013-04-11 22:39:32 UTC
Do you just want a clarifying note pointing out that "typeof <interfaceobject>" will be function?  I can add that, though I think it would be better place in the preceding section http://dev.w3.org/2006/webapi/WebIDL/#interface-object.
Comment 3 Erik Arvidsson 2013-04-12 17:10:04 UTC
I just thought a note would be useful since more than one smart person failed to come to this conclusion after reading the spec.