Fairen / box2dweb

Automatically exported from code.google.com/p/box2dweb
0 stars 0 forks source link

Object.defineProperty polyfill breaks any other library dependent on that method. #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Object.defineProperty polyfill is not correct
2. It checks whether __defineGetter__ etc. is defined, which is deprecated.
3. Solution: Don't manipulate defineProperty if it's available. No other && is 
required.

Original issue reported on code.google.com by cmarten...@gmail.com on 26 Sep 2013 at 12:34

GoogleCodeExporter commented 9 years ago
Addition: Object.prototype.defineProperty is the incorrect check, because it's 
a static method, not available on Object instances only (which is the prototype 
behaviour in native JS data types). So the check should be against 
Object.defineProperty.

Original comment by cmarten...@gmail.com on 26 Sep 2013 at 12:36