Cross-global instanceof

Anne van Kesteren annevk at
Thu Oct 31 08:38:18 PDT 2013

This keeps coming up. Last instance:

We have it for Array using Array.isArray(). It is unclear why the
arguments for arrays not apply to other types of objects, such as
array buffers, nodes, blobs, files, etc.

We could introduce something like

  Object.crossGlobalInstanceOf(instance, type)

which checks @@crossGlobalBrand or some such which works for built-ins
and is also usable by jQuery and the like.


More information about the es-discuss mailing list