can change during iteration, the behaviour of an
iterator defined to to loop through the items in order, starting
at index 0, and advancing this index on each iteration. Iteration ends when
- the index has gone past the end of the list.
+ the index has gone past the end of the list.
This is how array iterator objects work.
@@ -4270,7 +4270,7 @@
3.4. Exceptions
SyntaxError, which is deliberately omitted as
it is for use only by the ECMAScript parser).
The meaning of
- each
simple exception matches
+ each
simple exception matches
its corresponding
Error object in the
ECMAScript specification.
@@ -14281,7 +14281,8 @@
4.10. Exceptions
There
MUST exist a property on the ECMAScript global object
whose name is “DOMException” and value is an object called the
DOMException constructor object,
- which provides access to legacy DOMException code constants.
+ which provides access to legacy DOMException code constants and allows construction of
+ DOMException instances.
The property has the attributes
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.
@@ -14307,31 +14308,27 @@
4.10.1. DOMException constructor object
-
4.10.1.1. DOMException constructor object [[Call]] method
+
4.10.1.1. DOMException(message, name)
+
+
When the DOMException function is called with arguments message and name, the following steps are taken:
-
- The internal [[Call]] method of the
- DOMException constructor object
- MUST behave as follows, assuming
- arg0..n−1 is the list
- of argument values passed to the function:
-
- - Let O be a new object whose [[Prototype]]
- internal property is set to the DOMException prototype object
- and whose class string is “DOMException”.
- - If n > 0 and arg0 is not undefined, then:
+
- Let F be the active function object.
+ - If NewTarget is undefined, let newTarget be F, else let newTarget be NewTarget.
+ - Let super be F.[[GetPrototypeOf]]().
+ - ReturnIfAbrupt(super).
+ - If IsConstructor(super) is false, throw a TypeError exception.
+ - Let O be Construct(super, «message», newTarget).
+ - If name is not undefined, then
- - Let S be the result of calling ToString(arg0).
- - Call the [[DefineOwnProperty]] internal method of O passing
- “message”, Property Descriptor { [[Value]]: S,
- [[Writable]]: true, [[Enumerable]]: false,
- [[Configurable]]: true }, and false
- as arguments.
-
-
This shadows the “message” property from Error.prototype, whose initial value is the empty string.
-
-
+ - Let name be ToString(name).
+ - Let status be DefinePropertyOrThrow(O,
"name"
, PropertyDescriptor{[[Value]]: name, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
+ - ReturnIfAbrupt(status).
+ - Let code be the legacy code indicated in the error names table for error name name, or 0 if there is none.
+ - Let status be DefinePropertyOrThrow(O,
"code"
, PropertyDescriptor{[[Value]]: code, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
+ - ReturnIfAbrupt(status).
+
+
Return O.
@@ -14464,15 +14461,17 @@
4.12. Creating and throwing exceptions
the following steps
MUST be followed:
- - Let args be a list of ECMAScript
- values. If the optional user agent-defined message M was specified, then this list
- has a single element whose value is the result of
- converting
- M to a String value.
- Otherwise, the list is empty.
-
+ - If M was not specified, let M be undefined. Otherwise, let it be the result of converting M to a String value.
+ - Let N be the result of converting N to a String value.
+ - Let args be a list of ECMAScript values.
+
+ - E is DOMException
+ - args is (undefined, N).
+ - E is a simple exception
+ - args is (M)
+
+
- Let G be the current global environment.
-
- Let X be an object determined based on the type of E:
- E is DOMException
@@ -14483,29 +14482,8 @@ 4.12. Creating and throwing exceptions
from the global environment G.
-
- Let O be the result of calling X as a function
with args as the argument list.
-
- - If E is DOMException, then:
-
- - Call the [[DefineOwnProperty]] internal method of O passing
- “name”, Property Descriptor { [[Value]]: N,
- [[Writable]]: true, [[Enumerable]]: true,
- [[Configurable]]: true }, and false
- as arguments.
-
- - Let code be the legacy code indicated in the error names table
- for error name N, or 0 if there is none.
-
- - Call the [[DefineOwnProperty]] internal method of O passing
- “code”, Property Descriptor { [[Value]]: code,
- [[Writable]]: true, [[Enumerable]]: true,
- [[Configurable]]: true }, and false
- as arguments.
-
-
-
- Return O.
diff --git a/index.xml b/index.xml
index 148d6597..8403aacb 100644
--- a/index.xml
+++ b/index.xml
@@ -3618,7 +3618,7 @@ iterable<key-type, value-type>;
can change during iteration, the behaviour of an
iterator defined to to loop through the items in order, starting
at index 0, and advancing this index on each iteration. Iteration ends when
- the index has gone past the end of the list.
+ the index has gone past the end of the list.
This is how array iterator objects work.
@@ -4222,7 +4222,7 @@ ctx.drawRectangle(300, 200, { fillPattern: "red", position: new Point(10, 10) })
SyntaxError, which is deliberately omitted as
it is for use only by the ECMAScript parser).
The meaning of
- each simple exception matches
+ each simple exception matches
its corresponding Error object in the
ECMAScript specification.
@@ -14136,7 +14136,8 @@ C implements A;
There
MUST exist a property on the ECMAScript global object
whose name is “DOMException” and value is an object called the
DOMException constructor object,
- which provides access to legacy DOMException code constants.
+ which provides access to legacy DOMException code constants and allows construction of
+ DOMException instances.
The property has the attributes
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.
@@ -14162,31 +14163,27 @@ C implements A;
-
DOMException constructor object [[Call]] method
+
DOMException(message, name)
+
+
When the DOMException function is called with arguments message and name, the following steps are taken:
-
- The internal [[Call]] method of the
- DOMException constructor object
- MUST behave as follows, assuming
- arg0..n−1 is the list
- of argument values passed to the function:
-
- - Let O be a new object whose [[Prototype]]
- internal property is set to the DOMException prototype object
- and whose class string is “DOMException”.
- - If n > 0 and arg0 is not undefined, then:
+
- Let F be the active function object.
+ - If NewTarget is undefined, let newTarget be F, else let newTarget be NewTarget.
+ - Let super be F.[[GetPrototypeOf]]().
+ - ReturnIfAbrupt(super).
+ - If IsConstructor(super) is false, throw a TypeError exception.
+ - Let O be Construct(super, «message», newTarget).
+ - If name is not undefined, then
- - Let S be the result of calling ToString(arg0).
- - Call the [[DefineOwnProperty]] internal method of O passing
- “message”, Property Descriptor { [[Value]]: S,
- [[Writable]]: true, [[Enumerable]]: false,
- [[Configurable]]: true }, and false
- as arguments.
-
-
This shadows the “message” property from Error.prototype, whose initial value is the empty string.
-
-
+ - Let name be ToString(name).
+ - Let status be DefinePropertyOrThrow(O,
"name"
, PropertyDescriptor{[[Value]]: name, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
+ - ReturnIfAbrupt(status).
+ - Let code be the legacy code indicated in the error names table for error name name, or 0 if there is none.
+ - Let status be DefinePropertyOrThrow(O,
"code"
, PropertyDescriptor{[[Value]]: code, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
+ - ReturnIfAbrupt(status).
+
+
Return O.
@@ -14319,15 +14316,17 @@ C implements A;
the following steps
MUST be followed:
- - Let args be a list of ECMAScript
- values. If the optional user agent-defined message M was specified, then this list
- has a single element whose value is the result of
- converting
- M to a String value.
- Otherwise, the list is empty.
-
+ - If M was not specified, let M be undefined. Otherwise, let it be the result of converting M to a String value.
+ - Let N be the result of converting N to a String value.
+ - Let args be a list of ECMAScript values.
+
+ - E is DOMException
+ - args is (undefined, N).
+ - E is a simple exception
+ - args is (M)
+
+
- Let G be the current global environment.
-
- Let X be an object determined based on the type of E:
- E is DOMException
@@ -14338,29 +14337,8 @@ C implements A;
from the global environment G.
-
- Let O be the result of calling X as a function
with args as the argument list.
-
- - If E is DOMException, then:
-
- - Call the [[DefineOwnProperty]] internal method of O passing
- “name”, Property Descriptor { [[Value]]: N,
- [[Writable]]: true, [[Enumerable]]: true,
- [[Configurable]]: true }, and false
- as arguments.
-
- - Let code be the legacy code indicated in the error names table
- for error name N, or 0 if there is none.
-
- - Call the [[DefineOwnProperty]] internal method of O passing
- “code”, Property Descriptor { [[Value]]: code,
- [[Writable]]: true, [[Enumerable]]: true,
- [[Configurable]]: true }, and false
- as arguments.
-
-
-
- Return O.