FAQ Topic - What is a host object? (2010-04-04)

F

FAQ server

-----------------------------------------------------------------------
FAQ Topic - What is a host object?
-----------------------------------------------------------------------

A host object is any object supplied by the host environment to
complete the execution environment of ECMAScript.

A host object is not part of the ECMAScript implementation, but is
exposed to the ECMAScript implementation.

A host object may be implemented as a native ECMAScript object, however
this is not required. For example, Internet Explorer, implements many
scriptable DOM objects as ActiveX Objects, often resulting in unexpected errors.

http://jibbering.com/faq//faq/notes/code-guidelines/#hostObjects


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/
 
G

Garrett Smith

FAQ said:
-----------------------------------------------------------------------
FAQ Topic - What is a host object?
-----------------------------------------------------------------------

A host object is any object supplied by the host environment to
complete the execution environment of ECMAScript.

A host object is not part of the ECMAScript implementation, but is
exposed to the ECMAScript implementation.

A host object may be implemented as a native ECMAScript object, however
this is not required. For example, Internet Explorer, implements many
^
That extra comma should not be there. Fixed.
 
G

Garrett Smith

FAQ said:
-----------------------------------------------------------------------
FAQ Topic - What is a host object?
-----------------------------------------------------------------------

A host object is any object supplied by the host environment to
complete the execution environment of ECMAScript.

A host object is not part of the ECMAScript implementation, but is
exposed to the ECMAScript implementation.

A host object may be implemented as a native ECMAScript object, however
this is not required. For example, Internet Explorer, implements many
scriptable DOM objects as ActiveX Objects, often resulting in unexpected errors.

http://jibbering.com/faq//faq/notes/code-guidelines/#hostObjects
That URI is not right. I've adjusted the URI in the XML so that when
Bart's program parses it, the resulting URI should be the one wanted:

http://jibbering.com/faq/notes/code-guidelines/#hostObjects
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Sat, 3 Apr 2010 23:15:56, Garrett Smith

Needs two or three examples for browsers, and one or two for JScript in
WSH.
 
G

Garrett Smith

Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Sat, 3 Apr 2010 23:15:56, Garrett Smith


Needs two or three examples for browsers, and one or two for JScript in
WSH.
I've added a line on my local copy:
| Examples of some host objects: document, XMLHttpRequest, WScript.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Wed, 14 Apr 2010 11:30:22, Garrett Smith
I've added a line on my local copy:
| Examples of some host objects: document, XMLHttpRequest, WScript.

AFAIK, WScript is not ordinarily a host object in a browser. The
examples need to include where each object is hosted.
 
G

Garrett Smith

Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Wed, 14 Apr 2010 11:30:22, Garrett Smith


AFAIK, WScript is not ordinarily a host object in a browser. The
examples need to include where each object is hosted.

| Availability and behavior of a host object depends on the host
| environment.
|
| For example, in a browser engine,`XMLHttpRequest` might be available,
| with or without standard or proprietary features or events.
|
| For information on a particular host object, consult the pertinent
| documentation available for the implementation(s). For web browsers,
| this usually includes the w3c specifications as well as documentation
| for that vendor.
|
| See also:
|
<http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting>
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Thu, 15 Apr 2010 18:17:02, Garrett Smith
| For example, in a browser engine,`XMLHttpRequest` might be available,
| with or without standard or proprietary features or events.
|

There should be examples for other hosts; WSH for one and preferably at
least one other.
 
G

Garrett Smith

Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Thu, 15 Apr 2010 18:17:02, Garrett Smith


There should be examples for other hosts; WSH for one and preferably at
least one other.

This entry is to demystify objects in javascript.

Every time I see misconceptions about host objects on the NG, it has
involved browsers.

I would attribute this phenomenon to the plethora of badly written
scripts and widespread misinformation.

Having said that, it is fair to include another short example.

I considered mentioning Yahoo Widgets (Konfabulator) but I don't know
anything about those and the documentation is not trustworthy because it
is of poor quality and displays some misconceptions. For example:
"The outermost scope in the XML file is defined by the widget block."
<http://manual.widgets.yahoo.com/>

What "block"?

Added:
| Windows Script Host object model has the `WScript` object.

Any additional proposal to that?

I would add another myself, but I'm afraid that would exceed my
knowledge of other host environments -- I'm a browser guy.

Proposed text:
| Availability and behavior of a host object depends on the host
| environment.
|
| For example, in a browser,`XMLHttpRequest` might be available, with or
| without standard or proprietary features or events.
|
| Windows Script Host object model has the `WScript` object.
|
| For information on a particular host object, consult the pertinent
| documentation available for the implementation(s). For web browsers,
| this usually includes the w3c specifications as well as documentation
| for that browser.
|
| See also:
|
<http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top