archives

« Bugzilla Issues Index

#214 — Define Host Object


The current specification defines host object as:

| host object
| object supplied by the host environment to complete the
| execution environment of ECMAScript.
|
| NOTE Any object that is not native is a host object.

Thus, a host object is any object defined by the host environment. This would include the window object which acts as the global object (this === window).

The specification does not disallows host object from being a native ES object.

The problem is that Mark Miller believes otherwise: ``"host" simply means "non-native"''
http://www.mail-archive.com/es-discuss@mozilla.org/msg04972.html

While Allen agrees that there are two types of host objects:
https://mail.mozilla.org/pipermail/es-discuss/2010-July/011514.html

The specification further allows implementations to implement extensions.

| 16 Errors
| An implementation may extend program syntax[...]
| [...]
| An implementation may provide additional types, values, objects,
| properties, and functions beyond those described in this specification.


Which of the following are host objects:
window
window.atob
window.alert
ArrayBuffer
-?

The specification needs to differentiate between native host object and non-native host object.

Host object:
| object supplied by the host environment to complete the
| execution environment of ECMAScript.
|
| native host object - host object whose semantics can be fully described
| by this specification.
|
| non-native host object - host object that implements semantics or behavior
| that cannot be explained by this specification.


See discussion thread starting at https://mail.mozilla.org/pipermail/es-discuss/2012-January/020133.html


In the current draft the terms Host object and native object has been generally replaced with exotic objects and ordinary objects (with somewhat different meanings)

There is one lingering reference to Host Object that hopefully can be eliminated


in October 26, 2012 release draft