I'm still struggling with this. Does *anyone* know where, in the wild, Module Environments (a type of Lexical Environment) exist?https://twitter.com/padolsey/status/1151148086812696576 …
-
-
At least, this is how it works in JS engine binaries that don’t do Node.js-style wrapping. cc
@guybedford@bradleymeck@ljharb@MylesBorins to correct me on the above -
There's also <script>const foo = 'bar'</script> which exists on the global scope but not the global object, right?
- 2 more replies
New conversation -
-
-
In Node CJS is actually within a function scope, not global
-
that’s what I mean by “wrapped” — it’s wrapped in a function that exposes global etc. and then run in the global scope. Or do you mean that even the wrapped version is then function-scoped again?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
a classic script is wrapped and then run in the global scope