Re: [caplet] Re: ADsafe
- collin_jackson wrote:
> Square brackets are clearly problematic, as they allow access to eval.This is a case where conciseness matters for the acceptability of
> I suggest you deny them entirely and (optionally) allow authors use
> the ADSAFE API to proxy their array indexing.
> Instead of
> foo[bar] = foo[bar] + 1;
> ADSAFE.setIndex(foo, bar, ADSAFE.getIndex(foo, bar) + 1);
> The ADSAFE getIndex and setIndex API could ensure that "bar" is a
> number or safe string.
the restriction, so I suggest something like:
SET(foo, bar, GET(foo, bar) + 1);
David Hopwood <david.hopwood@...>
- 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.