You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The global contour is a scope that overshadows globalThis when evaluating “global code”. The global contour is the scope that persists variable declarations between calls to evaluate global code. Framed as a feature of compartments, we could add a “global” option to compartment.evaluate that signifies this evaluation mode and persists the global contour between calls.
compartment.evaluate("const example = 42;");compartment.evaluate("example");// 42compartment.evaluate("const example = 101;");// throws SyntaxError: Identifier 'example' has already been declared
Ideally, we could reconcile the global lexicals and global contour. However, evaluating global code should not be able to introduce variables that would overshadow globals in modules from the same compartment.
The global contour is a mutable property bag that must enforce rules for the order and behavior variable declarations.
The name “global contour” is reviled by all, but thankfully need not appear in code. Alternative suggestions are very welcome.
The global contour bears some similarity to global lexicals #35
The text was updated successfully, but these errors were encountered:
The global contour is a scope that overshadows
globalThis
when evaluating “global code”. The global contour is the scope that persists variable declarations between calls to evaluate global code. Framed as a feature of compartments, we could add a “global” option tocompartment.evaluate
that signifies this evaluation mode and persists the global contour between calls.Ideally, we could reconcile the global lexicals and global contour. However, evaluating global code should not be able to introduce variables that would overshadow globals in modules from the same compartment.
The global contour is a mutable property bag that must enforce rules for the order and behavior variable declarations.
The name “global contour” is reviled by all, but thankfully need not appear in code. Alternative suggestions are very welcome.
The global contour bears some similarity to global lexicals #35
The text was updated successfully, but these errors were encountered: