JavaScript Objects and Proxies

The cluster focuses on JavaScript's object model quirks, including prototype chain issues, property access pitfalls, and solutions like ES6 Proxies and Crockford objects.

📉 Falling 0.4x Programming Languages
3,454
Comments
20
Years Active
5
Top Authors
#2563
Topic ID

Activity Over Time

2007
5
2008
19
2009
92
2010
77
2011
213
2012
263
2013
207
2014
286
2015
318
2016
188
2017
231
2018
239
2019
179
2020
176
2021
201
2022
183
2023
225
2024
183
2025
162
2026
7

Keywords

e.g US IMHO this.foo SpiderMonkey JS A5 ES6 nodejs.org mozilla.org object objects monkey var array javascript property foo proxies patching

Sample Comments

gildas Oct 27, 2022 View on HN

See "Crockford Objects" here for example: https://levelup.gitconnected.com/crockford-objects-in-javasc...

lyschoening Nov 2, 2015 View on HN

There's still Proxy for that.https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...

pcwalton Feb 16, 2013 View on HN

This is coming in ES6, with Proxies.

TazeTSchnitzel Dec 21, 2013 View on HN

ES6 will add proxies, another approach.

bad_user Dec 18, 2018 View on HN

Objects in JavaScript are just maps, so technically speaking if they disallow "this[#foo]", it's just a cheap trick.

brundolf May 8, 2022 View on HN

They're probably talking about the fact that it also works on objects (JS equivalent of dicts)

delaaxe Dec 31, 2022 View on HN

Proxies and state-mutating getter functions are pretty edge features of JS tbh

TrevorBurnham May 23, 2010 View on HN

And god help you if you've extended the Array or Object prototypes.

gsnedders Dec 30, 2013 View on HN

No current browser should be vulnerable to this (ES5 requires object literals use [[DefineOwnProperty]], not [[Put]], and hence no setter on the prototype chain should be called). I believe all browsers have since fixed this.

WorldWideWayne Aug 8, 2014 View on HN

Goodbye object literals too, apparently.