Why typeof val === 'object' && val.constructor === An array error if val is created in another frame?

Crockford Quote in JavaScript Good Details:

We can ... define our own is_array function:

var is_array = function (value) { return value && typeof value === 'object' && value.constructor === Array; } 

Unfortunately, it cannot identify arrays that were created in another Windows or frame.

And then he does not explain why. So! Why?

+7
source share

All Articles