Re: [caplet] ADsafe
- Mike Samuel wrote:
> David-Sarah Hopwood <david.hopwood@...> wrote:They are evaluated identically (if Infinity is an unshadowable constant),
>> Mark Miller wrote:
>> > Mike Samuel <mikesamuel@...> wrote:
>> >> Mark Miller <erights@...> wrote:
>> >> > Douglas Crockford <douglas@...> wrote:
>> >> > > [...] or string literals that are not legal identifiers.
>> >> and "-Infinity"
>> > I purposely left that out because it would already be covered by
>> > Crock's "not legal identifiers" rule.
>> IIUC, foo['-Infinity'] would be, but foo[-Infinity] wouldn't.
> The two are identical.
but they have different syntax trees. Crock' rule was defined syntactically;
-Infinity without the quotes is not a string literal.
- I updated the ADsafe DOM interface. Previously, a method like .getValue() could return
a single value
an array of values
depending on the number of results. Now, a method like .getValue() will return the first value that is available, or undefined if there are none. A new method, .getValues() will always return an array, possibly an empty array.