From b3bfef067a59548ef763903a4e59ef1891508bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 20 Mar 2019 10:33:35 -0700 Subject: [PATCH] Respecify 'anonymous function' to mean the 'name' property is the empty string instead of being absent --- spec.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec.html b/spec.html index f9da4867db7..a942c439c04 100644 --- a/spec.html +++ b/spec.html @@ -7577,6 +7577,7 @@

%ThrowTypeError% ( )

The value of the [[Extensible]] internal slot of a %ThrowTypeError% function is *false*.

The `"length"` property of a %ThrowTypeError% function has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

+

The `"name"` property of a %ThrowTypeError% function has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

@@ -23515,8 +23516,8 @@

ECMAScript Standard Built-in Objects

For example, the function object that is the initial value of the `map` property of the Array prototype object is described under the subclause heading «Array.prototype.map (callbackFn [ , thisArg])» which shows the two named arguments callbackFn and thisArg, the latter being optional; therefore the value of the `"length"` property of that function object is 1.

Unless otherwise specified, the `"length"` property of a built-in function object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

-

Every built-in function object, including constructors, that is not identified as an anonymous function has a `name` property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. For functions that are specified as properties of objects, the name value is the property name string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have `"get "` or `"set "` prepended to the property name string. The value of the `name` property is explicitly specified for each built-in functions whose property key is a Symbol value.

-

Unless otherwise specified, the `name` property of a built-in function object, if it exists, has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

+

Every built-in function object, including constructors, has a `"name"` property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are identified as anonymous functions use the empty string as the value of the `"name"` property. For functions that are specified as properties of objects, the name value is the property name string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have `"get "` or `"set "` prepended to the property name string. The value of the `"name"` property is explicitly specified for each built-in functions whose property key is a Symbol value.

+

Unless otherwise specified, the `"name"` property of a built-in function object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

Every other data property described in clauses 18 through 26 and in Annex has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* } unless otherwise specified.

Every accessor property described in clauses 18 through 26 and in Annex has the attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, *undefined*. If only a set accessor is described the get accessor is the default value, *undefined*.

@@ -25097,7 +25098,7 @@

length

name

The value of the `name` property is a String that is descriptive of the function. The name has no semantic significance but is typically a variable or property name that is used to refer to the function at its point of definition in ECMAScript code. This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

-

Anonymous functions objects that do not have a contextual name associated with them by this specification do not have a `name` own property but inherit the `name` property of %Function.prototype%.

+

Anonymous functions objects that do not have a contextual name associated with them by this specification use the empty string as the value of the `"name"` property.