As it is said in the ECMAScript spec, all JavaScript code must be associated with a realm
. This spec entity, in turn, is related with the fabled global object. I have not found any prohibition on sharing a single global object between several realms.
So I wonder is it then possible, for example, to get true
from the expression arg instanceof Array
when arg
was created within the scope of a different realm (I mean something like this, it's a sample with <iframe>
).
Does not the ECMAScript guarantee that this sort of situations are unachievable?