(object)
| 222 | } |
| 223 | |
| 224 | function hasDefineProperty (object) { |
| 225 | if (('defineProperty' in Object)) { |
| 226 | try { |
| 227 | // test it |
| 228 | Object.defineProperty(object, 'sentinel1', { value: 1 }) |
| 229 | return 'sentinel1' in object; |
| 230 | } |
| 231 | catch (ex) { /* squelch */ } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | // Note: MSDN docs say that IE8 has this function, but tests show |
| 236 | // that it does not! JMH |