执行上下文是否有定义的名称,将所有其他内容封装在 JavaScript 中?

Is there a defined name for the execution context that encapsulates all others in JavaScript?

是否为执行上下文定义了名称,将所有其他封装在 JavaScript 中?

比如它叫"global execution context"。据我所知,ES6 规范中并未提及该短语。

它被称为“ES6 规范的global environment" as per the ES5 spec (or see the equivalent section”:

The global environment is a unique Lexical Environment which is created before any ECMAScript code is executed. The global environment’s Environment Record is an object environment record whose binding object is the global object (15.1). The global environment’s outer environment reference is null.

或者您正在寻找“initial global execution context”,其词法和变量环境是对全局环境的引用。

我认为没有比简单的 "global environment" 或 "global environment record" 更具体的术语(以区分其绑定对象),它在 ES6 规范中的多个地方使用,例如 §8.1 and §8.1.14(规范草案,这些章节编号可能会发生变化)。