realm

A separate JavaScript global environment with its own built-in objects, such as the one inside an iframe or a worker.

In more detail

An Error created in another realm uses that realm's Error class, so instanceof Error is false in yours. Checking a property or using Array.isArray is more reliable across realms. An iframe is a web page embedded inside another page.

Related terms

Taught in

References