Skip to content

Console expressions should be evaluated in a non-global context #1266

@outoftime

Description

@outoftime

E.g. declaring a var using the console should not make that variable available to project code. The console should have its own local context for variables.

I believe this can be achieved by having each console expression in the preview frame evaluated locally by a function which then returns a new function to evaluate the next expression.

This should also make const and let declarations work properly in browsers that support them, which they currently don’t.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions