Object.defineProperty(o, n, { get: function() { this[n] = {}; } }) this works in Firefox, and not in Chrome...
-
-
Replying to @seanmonstar
@seanmonstar what are you expecting to happen? You're not returning anything from your get...see?1 reply 0 retweets 0 likes -
Replying to @csuwildcat
@csuwildcat i forgot the `return this[n] = {}`. I'm hoping the property will be set to a plain object, but I don't know which acts correctly2 replies 0 retweets 0 likes -
Replying to @seanmonstar
@seanmonstar so when the get is called you want it to set and hold a new object? If so, you need to hold an outside ref to a new object.1 reply 0 retweets 0 likes
Replying to @csuwildcat
@csuwildcat code you can execute and see what I mean: https://gist.github.com/seanmonstar/1f35fe3b0108f750afde …
9:22 AM - 23 Jun 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.