Skip to content

What is [].constructor.constructor when executed inside the fresh eval? #7

@bakkot

Description

@bakkot

I see that global.eval('() => {}').constructor is supposed to be the fresh Function, not the "outer" one. Presumably this is accomplished by rewiring the function syntax inside of the fresh eval so that the [[Prototype]] of new functions is the fresh Function. So far so good. But what about global.eval('[]').constructor.constructor? Is that not still the outer Function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions