Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: About reference and instanceof #12

Closed
Tofandel opened this issue Mar 16, 2022 · 1 comment
Closed

Question: About reference and instanceof #12

Tofandel opened this issue Mar 16, 2022 · 1 comment
Labels
question Further information is requested

Comments

@Tofandel
Copy link

Tofandel commented Mar 16, 2022

Should getIntrinsic output an object with the same reference as the original global?

So that new getIntrinsic('Map') instanceof Map would evaluate to true assuming Map wasn't modified?

I'm pretty sure yes, as It's currently the case in the package and the word "original" being used but might not be clear enough in this spec

@ljharb
Copy link
Member

ljharb commented Mar 16, 2022

Yes, absolutely it must; there's no other way it could work.

(the term you're looking for here is "identity", not "reference")

@ljharb ljharb added the question Further information is requested label Mar 16, 2022
@ljharb ljharb closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants