jasnell / proposal-istypes

TC-39 Proposal for additional is{Type} APIs
201 stars 7 forks source link

cross-context instanceof checks facilitated by Frozen Realms proposal? #6

Closed jokeyrhyme closed 7 years ago

jokeyrhyme commented 7 years ago

You might be interested in this, if you have not already seen it:

This concept of different execution contexts sharing immutable copies of certain globals could be useful for your cross-context check example.

Imagine if iframes in browsers and VM contexts in Node.js were frozen realms such that global.Date was the very same constructor across different contexts? This could make instanceof or similar proposed checks feasible.

jasnell commented 7 years ago

This would certainly make things easier.

jasnell commented 7 years ago

I believe the current proposal handles this case.