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

setter/getter syntax

Expand Messages
  • Steven Parkes
    Any idea how hard it would be/will be to add the ES5 setter/getter syntax to the parser? Example x = {get value(){return foo ;}};
    Message 1 of 3 , Feb 21, 2010
    • 0 Attachment
      Any idea how hard it would be/will be to add the ES5 setter/getter syntax to the parser?

      Example

      x = {get value(){return "foo";}};
    • Douglas Crockford
      ... It won t be hard at all, but I won t be doing it until ES5 browsers become dominant. In the mean time, use Object.defineOwnProperties.
      Message 2 of 3 , Feb 21, 2010
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, Steven Parkes <smparkes@...> wrote:
        >
        > Any idea how hard it would be/will be to add the ES5 setter/getter syntax to the parser?
        >
        > Example
        >
        > x = {get value(){return "foo";}};

        It won't be hard at all, but I won't be doing it until ES5 browsers become dominant. In the mean time, use Object.defineOwnProperties.
      • Steven Parkes
        ... I was afraid you might say that. Unfortunately for me, I have a bunch of server-side JS against engines that have supported the syntax for quite a while
        Message 3 of 3 , Feb 21, 2010
        • 0 Attachment
          > It won't be hard at all, but I won't be doing it until ES5 browsers become dominant. In the mean time, use Object.defineOwnProperties.

          I was afraid you might say that.

          Unfortunately for me, I have a bunch of server-side JS against engines that have supported the syntax for quite a while that I can't lint because of this ...
        Your message has been successfully submitted and would be delivered to recipients shortly.