You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Open
stuartZhang opened this issue
Jul 28, 2016
· 1 comment
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.
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?
The text was updated successfully, but these errors were encountered: