Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Because the shorthand getter syntax "get <property name>(){...}" isn't supported in Safari 5.x, I'd like to replace it with Object.defineProperty(...) #2131

Description

@stuartZhang

By scanning the generated ES5 code, I discovered that the getter methods follow the format:

{
get {return ***;}
}

The above getter and setter syntax is good for most of the modern web browsers. However, I'd like to run the generated ES5 code in the Safari 5.x which doesn't sustain the getter shorthand syntax. On the contrary, "Object.defineProperties(...)" is supported utterly.

Object.defineProperties(, {
: {
enumerable: true,
'get': function(){return ***;}
}
})

So, I intend to modify the Traceur source code to replace the shorthand syntax with the integral version based on Object.defineProperties(...).

My 1st goal is the getter counterpart serving the ES6 export commands.

Could you please teach me which Traceur source-code file is most relevant to my 1st goal?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions