Loading ...
Sorry, an error occurred while loading the content.

ADsafe

Expand Messages
  • Douglas Crockford
    I relaxed the ADsafe.get(object, name) function. The only names it excludes now are the _hanging_underbar_ names. It allows all other names. It requires that
    Message 1 of 36 , Feb 20, 2008
    • 0 Attachment
      I relaxed the ADsafe.get(object, name) function. The only names it
      excludes now are the _hanging_underbar_ names. It allows all other names.

      It requires that -object- is in fact an object and not a function. And
      it will not return a function value.

      The ADsafe.set(object, name, value) requires that -object- and -value-
      are not functions. There is no need to block 'prototype' because
      .prototype is only meaningful on functions, and set won't mess with
      functions.

      I think that prevents eval and related shenanigans without an explicit
      blacklist.
    • Douglas Crockford
      I updated the ADsafe DOM interface. Previously, a method like .getValue() could return undefined a single value an array of values depending on the number of
      Message 36 of 36 , Nov 11, 2010
      • 0 Attachment
        I updated the ADsafe DOM interface. Previously, a method like .getValue() could return

        undefined
        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.
      Your message has been successfully submitted and would be delivered to recipients shortly.