In web browsers, is a window object a native ECMAScript object?

The ECMAScript specification defines "a unique global object that is created before the control enters any execution context . " This global object is a standard built-in ECMAScript object and therefore a native object.

The specification also states:

In addition to the properties defined in this specification, a global object may have additional properties defined by a node. This may include a property whose value is the global object itself; for example, in the Object Model of an HTML document, the property of the windowglobal object is the global object itself.

Thus, in web browsers, the object windowis simply a convenient name for the global ECMAScript object, so the object windowis a native ECMAScript object.

Did I understand correctly?

+5
source share
3 answers

, " " "-". ECMAScript , . , , "". ( ES, [[propName]]) . DOM, , , ES, , " ".

, , , . ES, , , ES ES, " ES-". "-" , ES, , - , COM, XPCOM API V8. DOM . , , , , .

ES, , . "" "" : http://wiki.ecmascript.org/doku.php?id=strawman:terminology. , .

+5

(, , ) , , . :

ECMAScript, , .

:

ECMAScript.

, , window, , ECMAScript. , ECMAScript.

, ECMAScript, , V8, TraceMonkey .., window. , DOM (, DOMWindow window).

+2

, . , this ( " " ), this window . JSVM-. , v8-users ( .) - , , .

0
source

All Articles