MCPcopy Create free account
hub / github.com/cujojs/poly / hasDefineProperty

Function hasDefineProperty

object.js:224–233  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

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

Callers 1

object.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected