On Nov 19, 7:55 pm, Jorge Chamorro <[email protected]> wrote:
> On 18/11/2010, at 00:46, RobG wrote:
>
>
>
> > ... window is a host object ...
>
> Please stop spreading FUD. Seehttp://www.w3.org/TR/Window/
>
> "This specification defines the Window object, which provides the global 
> namespace for web scripting languages"

The W3C does not define language features of ECMAScript, ECMA does.
Never the less, the window object described above is, by the
definition provided in the ECMAScript Language Specification, a host
object.

"...an ECMAScript program will provide not only the objects and other
facilities described in this specification but also certain
environment-specific host objects, whose description and behaviour are
beyond the scope of this specification..."

ECMA-262 ed 3, section 4.

And in section 11.4.3 is states that the value returned by a typeof
test on a host object is implementation-dependent.



> c.l.js.-itis ?

No. I was pointing out that the value that a host object or property
may return for a typeof test is *defined* in the relevant standard as
being implementation dependent (that is, the author of that
environment can do whatever they want). There is nowhere in any W3C
standard that says what value a typeof test on DOM objects (which are
all host objects) should return. Further, it is trivial to discover
inconsistent results across browsers for a great many objects and
properties.

So basing a feature test solely on the result of a typeof test on a
host object is certain to be unreliable.

--
Rob


-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to