简体   繁体   English

JavaScript 中的外部源是什么意思?

[英]What is meant as by an external source in JavaScript?

The ECMAScript language specification at section 4.4.2 which defines implementation-defined as:第 4.4.2 节中的 ECMAScript 语言规范将implementation-defined为:

  • An implementation-defined facility is defined in whole or in part by an external source to this specification实现定义的设施由本规范的外部来源全部或部分定义

Now what exactly is meant here by an 'external source'?现在,“外部来源”到底是什么意思? Would an external source be considered some random JavaScript code put inside of some JavaScript features?外部源是否会被视为一些随机 JavaScript 代码放在一些 JavaScript 功能中? Let's see with an example:让我们看一个例子:

function func(){
     var a = 10;
     var k = "variable";
     var obj = {};
}

Would the external source in this case be considered the declared name, as well as the variables defined within the function?在这种情况下,外部源是否会被视为声明的名称,以及 function 中定义的变量?

Or if this isn't the case then could you explain what is meant by the above definition and what would be considered an external source?或者,如果不是这种情况,那么您能否解释上述定义的含义以及将什么视为外部来源?

No, implementation-defined refers to the implementation of the JavaScript engine and native functions provided by the host application that uses the engine.不,实现定义是指 JavaScript 引擎的实现以及使用该引擎的主机应用程序提供的本机功能。 It doesn't mean JavaScript source code executed by the engine.这并不意味着引擎执行的 JavaScript 源代码。

The term "external source" refers to documents such as the Node.js API specification or the HTML specification and related web platform standards.术语“外部源”是指诸如 Node.js API 规范或 HTML 规范和相关 Z2567A5EC93705EB189DZE8 平台标准等文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM