[[Class]] Property of Host Object

Garrett Smith dhtmlkitchen at gmail.com
Sun Jul 18 18:29:09 PDT 2010

On 7/18/10, Allen Wirfs-Brock <Allen.Wirfs-Brock at microsoft.com> wrote:
>>> The more important issue is our intent regarding the definitions of
>>> "host" and "native" objects.
> First regarding, alert in IE.  Historically it is what it is and nobody
> should make any assumptions concerning the future based upon previous
> versions of IE or what they have observed so for in IE9 preview builds.  I

I hope the same can be said for the bug related to catch clauses and
scope in IE9.

> don't think there is any disagreement that the [[class]] of alert should be
> 'Function'. However, if you want to pin that down in a standard then WebIDL
> is probably the place you need to do it.

What is the basis for making assertions of what the [[Class]] for any
host object should be?


> So essentially, they are two kinds of host objects: native host objects and
> non-native host objects.  The spec. doesn't explicitly talk about native
> host objects because their hostness is semantically irrelevant if they are
> also native.

While that is true for the purposes of the specification, it is not
necessarily true for script authors. For any script wanting to define
`isHostObject`, that script is going to be in a predicament.

 Hence, when the spec. talks about "host objects" in most cases
> it is really talking about non-native host objects in order to impose
> specific sematic constraints upon them.  I believe that in most cases in the
> ES5 spec,  "host object" should be read as meaning "non-native host object".

Again, if the specification definition of host object is correct --
and you have confirmed that it is -- then there are two types of host
objects, native, and non-native. And in that case, the clause that
mentions "[[Class]]" property must change as I initially suggested.

[snip remainder]


More information about the es-discuss mailing list