Re: hasFeature and ECMAScript

In order to hopefuly clear up this issue I would like to explain the ECMAScript values.

undefined mean that the variable has not been initialized with a value.
null means that the variable has been initialized to nothing.

When the DOM methods allow you to send a value, either an object, string, or no value at all, it is still wanting something sent.  You cannot send a undefined value because undefined in not an initialized value.

Jeff Yates
http://www.pbwizard.com



---------- Original Message ----------------------------------
From: "Fred L. Drake, Jr." <fdrake@acm.org>
Date: Thu, 12 Jul 2001 18:46:10 -0400 (EDT)


Joseph Kesselman wrote:
 > I'd say that's a binding issue -- "what does null mean in this binding"

Thomas Much writes:
 > null and undefined are two different values in ECMAScript, so this could be
 > somewhat dangerous (both values evaluate to boolean false, but if an

  This is a matter of the binding.  It sounds to me like the only
reasonable way to do this is to bind the IDL null value to the
ECMAScript null value; undefined is a different concept.  Since the
issue doesn't appear to be the value assigned to parameters omitted by
the caller, since the DOM doesn't describe any optional parameters,
there's no clear need to accept the undefined value.

 > But if null is an input parameter and it is not used to specify an empty
 > reference but an unspecified value, an ECMAScript programmer should be
 > allowed to pass undefined as well, because "undefined" is in ECMAScript

  But there are no unspecified values in the DOM specifications,
except where the specs are still being written.  Or at least I haven't
noticed that situation.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations



--
Jeff Yates
e-mail:    PBWiz@PBWizard.com
Homepage:  http://www.PBWizard.com

--

Received on Thursday, 12 July 2001 19:23:58 UTC