Are the default Symbol.species accessors intended to be configurable?
# Kevin Smith (9 years ago)
Is this a correct reading of the spec? Is this a bug in the spec? tc39/test262/blob/master/test/built-ins/RegExp/Symbol.species/symbol-species.js tests that the RegExp[Symbol.species] property is configurable. Additionally, it appears to break at least one major webpage if RegExp[Symbol.species] is not configurable.
Check out the last two paragraphs of tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects, which specifies the default property attributes for the standard built-ins.
# Keith Miller (9 years ago)
Ah, I missed that section.
According to my reading of the spec, table 4 says that any property that does not explicitly state what its attributes are should use [[Configurable]]:false by default. Section 21.2.4.2 does not list attributes for the RegExp[Symbol.species] accessor property. Thus, we should use the default value for [[Configurable]], which is false. The same appears to be true for each other default Symbol.species accessor property.
Is this a correct reading of the spec? Is this a bug in the spec? tc39/test262/blob/master/test/built-ins/RegExp/Symbol.species/symbol-species.js, tc39/test262/blob/master/test/built-ins/RegExp/Symbol.species/symbol-species.js tests that the RegExp[Symbol.species] property is configurable. Additionally, it appears to break at least one major webpage if RegExp[Symbol.species] is not configurable.
Thanks, Keith Miller