diff --git a/index.bs b/index.bs index 02484724..5feecfb4 100644 --- a/index.bs +++ b/index.bs @@ -4427,47 +4427,45 @@ user agent-defined value that provides human readable details of the error. There are two kinds of exceptions available to be thrown from specifications. The first is a simple exception, which -is identified by one of the following names: - -* "Error" -* "EvalError" -* "RangeError" -* "ReferenceError" -* "TypeError" -* "URIError" - -These correspond to all of the [=ECMAScript error objects=] (apart from -SyntaxError, which is deliberately omitted as -it is for use only by the ECMAScript parser). -The meaning of -each [=simple exception=] matches -its corresponding Error object in the +is identified by one of the following types: + +* EvalError +* RangeError +* ReferenceError +* TypeError +* URIError + +These correspond to all of the [=ECMAScript error objects=] +(apart from SyntaxError and Error, +which are deliberately omitted as they are reserved for use +by the ECMAScript parser and by authors, respectively). +The meaning of each [=simple exception=] matches +its corresponding error object in the ECMAScript specification. The second kind of exception is a DOMException, which is an exception that encapsulates a name and an optional integer code, for compatibility with historically defined exceptions in the DOM. -For [=simple exceptions=], -the [=error name=] is the name -of the exception. -For a {{DOMException}}, -the [=error name=] must -be one of the names listed in the [=error names table=] -below. The table also indicates the {{DOMException}}'s integer code -for that error name, if it has one. - -There are two types that can be used to refer to -exception objects: {{Error!!interface}}, which encompasses all exceptions, +For [=simple exceptions=], the [=error name=] is the type of the exception. +For {{DOMException|DOMExceptions}}, the [=error name=] must be one of the names +listed in the [=error names table=] below. +The table also indicates the {{DOMException}}'s integer code for that error name, +if it has one. + +There are two types that can be used to refer to exception objects: +{{Error!!interface}}, which encompasses all exceptions, and {{DOMException}} which includes just DOMException objects. This allows for example an [=operation=] to be declared to have a {{DOMException}} [=return type=] or an [=attribute=] to be of type {{Error!!interface}}. -Exceptions can be created by providing its -[=error name=]. -Exceptions can also be thrown, by providing the +[=Simple exceptions=] can be created +by providing their [=error name=]. +{{DOMException|DOMExceptions}} can be [=created=] +by providing their [=error name=] followed by {{DOMException}}. +Exceptions can also be thrown, by providing the same details required to [=created|create=] one. The resulting behavior from creating and throwing an exception is language binding-specific. @@ -4478,33 +4476,22 @@ entails in the ECMAScript language binding.
Here is are some examples of wording to use to create and throw exceptions. - To throw a new [=simple exception=] named - {{TypeError}}: + To throw a new [=simple exception=] named {{TypeError}}:
- - [=Throw=] a TypeError. - + [=Throw=] a {{TypeError}}.
- To throw a new {{DOMException}} with - [=error name=] - {{IndexSizeError}}: + To throw a new {{DOMException}} with [=error name=] "{{IndexSizeError!!exception}}":
- - [=Throw=] an IndexSizeError. - + [=Throw=] an "{{IndexSizeError!!exception}}" {{DOMException}}.
- To create a new {{DOMException}} with - [=error name=] - {{SyntaxError}}: + To create a new {{DOMException}} with [=error name=] "{{SyntaxError!!exception}}":
- - Let object be a newly [=created=] SyntaxError. - + Let object be a newly [=created=] "{{SyntaxError!!exception}}" {{DOMException}}.
@@ -4690,7 +4677,7 @@ Note: If an error name is not listed here, please file a bug as indicated at the "DOMStringSizeError"
DOMSTRING_SIZE_ERR (2) - Use RangeError. + Use {{RangeError}}. @@ -4705,9 +4692,9 @@ Note: If an error name is not listed here, please file a bug as indicated at the INVALID_ACCESS_ERR (15) - Use TypeError for invalid arguments, - "{{NotSupportedError!!exception}}" for unsupported operations, and - "{{NotAllowedError!!exception}}" for denied requests. + Use {{TypeError}} for invalid arguments, + "{{NotSupportedError!!exception}}" {{DOMException}} for unsupported operations, and + "{{NotAllowedError!!exception}}" {{DOMException}} for denied requests. @@ -4722,7 +4709,7 @@ Note: If an error name is not listed here, please file a bug as indicated at the "TypeMismatchError"
TYPE_MISMATCH_ERR (17) - Use TypeError. + Use {{TypeError}}. @@ -6440,7 +6427,7 @@ it has characteristics as follows:

When an algorithm says to -throw a SomethingError +throw a SomethingError then this means to construct a new ECMAScript SomethingError object and to throw it, just as the algorithms in ECMA-262 do. @@ -6866,10 +6853,10 @@ may return any value, which will be discarded. then: 1. If |x| is NaN, +∞, or −∞, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Set |x| to [=!=] IntegerPart(|x|). 1. If |x| < |lowerBound| or |x| > |upperBound|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return |x|. 1. If |x| is not NaN and the conversion to an IDL value is being performed due to any of the following: @@ -6902,7 +6889,7 @@ may return any value, which will be discarded. 1. Let |x| be [=?=] [=ToNumber=](|V|). 1. If |x| is NaN, +∞, or −∞, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |S| be the set of finite IEEE 754 single-precision floating point values except −0, but with two special values added: 2128 and −2128. @@ -6911,7 +6898,7 @@ may return any value, which will be discarded. even significand if there are two [=equally close values=]. (The two special values 2128 and −2128 are considered to have even significands for this purpose.) - 1. If |y| is 2128 or −2128, then throw a TypeError. + 1. If |y| is 2128 or −2128, then [=es throw|throw=] a TypeError. 1. If |y| is +0 and |x| is negative, return −0. 1. Return |y|. @@ -6975,7 +6962,7 @@ value when its bit pattern is interpreted as an unsigned 32 bit integer. 1. Let |x| be [=?=] [=ToNumber=](|V|). 1. If |x| is NaN, +∞, or −∞, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL {{double}} value that has the same numeric value as |x|. @@ -7065,7 +7052,7 @@ value when its bit pattern is interpreted as an unsigned 64 bit integer. 1. Let |x| be [=ToString=](|V|). 1. If the value of any [=element=] - of |x| is greater than 255, then throw a TypeError. + of |x| is greater than 255, then [=es throw|throw=] a TypeError. 1. Return an IDL {{ByteString}} value whose length is the length of |x|, and where the value of each element is the value of the corresponding element of |x|. @@ -7115,7 +7102,7 @@ values are represented by ECMAScript Object values. An ECMAScript value |V| is [=converted to an IDL value|converted=] to an IDL {{object}} value by running the following algorithm: - 1. If [=Type=](|V|) is not Object, then throw a TypeError. + 1. If [=Type=](|V|) is not Object, then [=es throw|throw=] a TypeError. 1. Return the IDL {{object}} value that is a reference to the same object as |V|. @@ -7138,12 +7125,12 @@ values are represented by ECMAScript Object or An ECMAScript value |V| is [=converted to an IDL value|converted=] to an IDL [=interface type=] value by running the following algorithm (where |I| is the [=interface=]): - 1. If [=Type=](|V|) is not Object, then throw a TypeError. + 1. If [=Type=](|V|) is not Object, then [=es throw|throw=] a TypeError. 1. If |V| is a [=platform object=] that implements |I|, then return the IDL [=interface type=] value that represents a reference to that platform object. 1. If |V| is a [=user object=] that is considered to implement |I| according to the rules in [[#es-user-objects]], then return the IDL [=interface type=] value that represents a reference to that user object, with the [=incumbent settings object=] as the [=callback context=]. - 1. Throw a TypeError. + 1. [=es throw|Throw=] a TypeError.

@@ -7167,7 +7154,7 @@ the object (or its prototype chain) correspond to [=dictionary members=]. to an IDL [=dictionary type=] value by running the following algorithm (where |D| is the [=dictionary type=]): - 1. If [=Type=](|V|) is not Undefined, Null or Object, then throw a TypeError. + 1. If [=Type=](|V|) is not Undefined, Null or Object, then [=es throw|throw=] a TypeError. 1. Let |dict| be an empty dictionary value of type |D|; every [=dictionary member=] is initially considered to be [=present|not present=]. @@ -7232,7 +7219,7 @@ values. 1. Let |S| be the result of calling [=ToString=](|V|). 1. If |S| is not one of |E|’s [=enumeration values=], - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the enumeration value of type |E| that is equal to |S|. @@ -7263,7 +7250,7 @@ when they can be any object. whose type is a [=nullable type|nullable=] [=callback function=] that is annotated with [{{TreatNonObjectAsNull}}], - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL [=callback function type=] value that represents a reference to the same object that |V| represents, with the [=incumbent settings object=] as the [=callback context=]. @@ -7331,12 +7318,12 @@ ECMAScript Array values. to an IDL sequence<T> value as follows: 1. If |V| is not an object, - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |method| be the result of [=GetMethod=](|V|, [=@@iterator=]). 1. [=ReturnIfAbrupt=](|method|). 1. If |method| is undefined, - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Return the result of [=creating a sequence from an iterable|creating a sequence=] from |V| and |method|. @@ -7483,7 +7470,7 @@ ECMAScript Object values. 1. If [=Type=](|O|) is Undefined or Null, return |result|. 1. If [=Type=](|O|) is not Object, - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |keys| be [=?=] |O|.\[[OwnPropertyKeys]](). 1. Repeat, for each element |key| of |keys| in [=List=] order: 1. Let |desc| be [=?=] |O|.\[[GetOwnProperty]](|key|). @@ -7624,7 +7611,7 @@ objects. 1. Otherwise, return the result of performing any steps that were required to be run if the promise was rejected, with |reason| as the rejection reason. 1. Let |then| be the result of calling the internal \[[Get]] method of |promise| with property name “then”. - 1. If |then| is not [=callable=], then throw a TypeError. + 1. If |then| is not [=callable=], then [=es throw|throw=] a TypeError. 1. Return the result of calling |then| with |promise| as the this value and |onFulfilled| and |onRejected| as its two arguments. @@ -7748,7 +7735,7 @@ that correspond to the union’s [=member types=]. 1. If |types| includes a {{boolean}}, then return the result of [=converted to an IDL value|converting=] |V| to {{boolean}}. - 1. Throw a TypeError. + 1. [=es throw|Throw=] a TypeError.

@@ -7776,7 +7763,7 @@ platform objects for {{DOMException|DOMExceptions}}. 1. If [=Type=](|V|) is not Object, or |V| does not have an \[[ErrorData]] [=internal slot=], - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL {{Error!!interface}} value that is a reference to the same object as |V|. @@ -7801,7 +7788,7 @@ by platform objects for {{DOMException|DOMExceptions}}. 1. If [=Type=](|V|) is not Object, or |V| is not a platform object that represents a {{DOMException}}, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL {{DOMException}} value that is a reference to the same object as |V|. @@ -7827,7 +7814,7 @@ are represented by objects of the corresponding ECMAScript class. 1. If [=Type=](|V|) is not Object, or |V| does not have an \[[ArrayBufferData]] [=internal slot=], or [=IsDetachedBuffer=](|V|) is true, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL {{ArrayBuffer}} value that is a reference to the same object as |V|. @@ -7839,7 +7826,7 @@ are represented by objects of the corresponding ECMAScript class. 1. If [=Type=](|V|) is not Object, or |V| does not have a \[[DataView]] [=internal slot=], - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL {{DataView}} value that is a reference to the same object as |V|. @@ -7863,7 +7850,7 @@ are represented by objects of the corresponding ECMAScript class. 1. If [=Type=](|V|) is not Object, or |V| does not have a \[[TypedArrayName]] [=internal slot=] with a value equal to the name of |T|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return the IDL value of type |T| that is a reference to the same object as |V|. @@ -7886,12 +7873,12 @@ a reference to the same object that the IDL value represents. 1. If |O| has a \[[ViewedArrayBuffer]] [=internal slot=], then: 1. Set |arrayBuffer| to the value of |O|’s \[[ViewedArrayBuffer]] [=internal slot=]. 1. If |arrayBuffer| is undefined, then - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Set |offset| to the value of |O|’s \[[ByteOffset]] [=internal slot=]. 1. Set |length| to the value of |O|’s \[[ByteLength]] [=internal slot=]. 1. Otherwise, set |length| to the value of |O|’s \[[ArrayBufferByteLength]] [=internal slot=]. 1. If [=IsDetachedBuffer=](|O|), then - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |data| be the value of |O|’s \[[ArrayBufferData]] [=internal slot=]. 1. Return a reference to or copy of (as required) the |length| bytes in |data| starting at byte offset |offset|. @@ -9748,7 +9735,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]] 1. Let |maxarg| be the length of the longest type list of the entries in |S|. 1. Initialize |argcount| to be min(|maxarg|, |n|). 1. Remove from |S| all entries whose type list is not of length |argcount|. - 1. If |S| is empty, then throw a TypeError. + 1. If |S| is empty, then [=es throw|throw=] a TypeError. 1. Initialize |d| to −1. 1. Initialize |method| to undefined. 1. If there is more than one entry in |S|, then set @@ -9936,7 +9923,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]] 1. Otherwise: if there is an entry in |S| that has {{any}} at position |i| of its type list, then remove from |S| all other entries. - 1. Otherwise: throw a TypeError. + 1. Otherwise: [=es throw|throw=] a TypeError. 1. Let |callable| be the [=operation=] or [=extended attribute=] of the single entry in |S|. 1. If |i| = |d| and |method| is not undefined, then @@ -10123,9 +10110,9 @@ both as a function and as a constructor. 1. If |I| was not declared with a [{{Constructor}}] [=extended attribute=], then - throw a TypeError. + [=es throw|throw=] a TypeError. 1. If [=NewTarget=] is undefined, then - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |id| be the identifier of interface |I|. 1. Initialize |S| to the [=effective overload set=] @@ -10178,7 +10165,7 @@ whose value is the identifier of the corresponding interface. 1. If |V| is not an object, return false. 1. Let |O| be the result of calling the \[[Get]] method of |A| with property name “prototype”. - 1. If |O| is not an object, throw a TypeError exception. + 1. If |O| is not an object, [=es throw|throw=] a TypeError exception. 1. If |V| is a platform object that implements the interface for which |O| is the [=interface prototype object=], return true. @@ -10559,7 +10546,7 @@ The characteristics of this property are as follows: 1. If the [=attribute=] was specified with the [{{LenientThis}}] [=extended attribute=], then return undefined. - 1. Otherwise, throw a TypeError. + 1. Otherwise, [=es throw|throw=] a TypeError. 1. Set |idlValue| to be the result of performing the actions listed in the description of the attribute that occur when getting (or those listed in the description of the inherited attribute, if this attribute is declared to [=inherit its getter=]), @@ -10587,7 +10574,7 @@ The characteristics of this property are as follows: Otherwise, it is a Function object whose behavior when invoked is as follows: 1. If no arguments were passed to the Function, then - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |V| be the value of the first argument passed to the Function. 1. If the [=attribute=] is a [=regular attribute=], then: 1. Let |I| be the [=interface=] @@ -10605,7 +10592,7 @@ The characteristics of this property are as follows: 1. If |validThis| is false and the [=attribute=] was not specified with the [{{LenientThis}}] [=extended attribute=], - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. If the attribute is declared with a [{{Replaceable}}] extended attribute, then: 1. Let |P| be the identifier of the attribute. @@ -10618,7 +10605,7 @@ The characteristics of this property are as follows: extended attribute, then: 1. Let |Q| be the result of calling the \[[Get]] method on |O| using the identifier of the attribute as the property name. - 1. If |Q| is not an object, then throw a TypeError. + 1. If |Q| is not an object, then [=es throw|throw=] a TypeError. 1. Let |A| be the attribute identified by the [{{PutForwards}}] extended attribute. 1. Call the \[[Put]] method on |Q| using the identifier of |A| as the property name and |V| as the value. @@ -10724,7 +10711,7 @@ property-installation style as namespaces.) 1. If |O| is a [=platform object=], then [=perform a security check=], passing |O|, |id|, and "method". 1. If |O| is not a [=platform object=] that implements the interface |target|, - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Let |S| be the [=effective overload set=] for [=regular operations=] (if |op| is a regular operation) or for [=static operations=] (if |op| is a static operation) with [=identifier=] |id| on |target| and with argument count |n|. @@ -10781,7 +10768,7 @@ then there must exist a property with the following characteristics: * the [=identifier=] of the [=stringifier=], and * the type “method”. 1. If |O| is not an object that implements the [=interface=] - on which the stringifier was declared, then throw a TypeError. + on which the stringifier was declared, then [=es throw|throw=] a TypeError. 1. Let |V| be an uninitialized variable. 1. Depending on where stringifier was specified:

@@ -10836,7 +10823,7 @@ The location of the property is determined as follows: * the [=identifier=] of the [=serializer=], and * the type “method”. 1. If |O| is not an object that implements the [=interface=] - on which the serializer was declared, then throw a TypeError. + on which the serializer was declared, then [=es throw|throw=] a TypeError. 1. Depending on how serializer was specified:
: on an [=operation=] with an identifier @@ -10935,7 +10922,7 @@ then the Function object is [=%ArrayProto_values%=]. 1. Let |interface| be the [=interface=] the [=iterable declaration=] is on. 1. If |object| is not a [=platform object=] that implements |interface|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |iterator| be a newly created [=default iterator object=] for |interface| with |object| as its target and iterator kind “key+value”. 1. Return |iterator|. @@ -10957,7 +10944,7 @@ then the Function object is [=%ArrayProto_values%=]. that implements the [=interface=] on which the [=maplike declaration=] or [=setlike declaration=] is defined, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. If the interface has a [=maplike declaration=], then: 1. Let |backing| be the value of the \[[BackingMap]] [=internal slot=] of |object|. 1. Return [=CreateMapIterator=](|backing|, "key+value"). @@ -11050,9 +11037,9 @@ the initial value of the “forEach” data property of [=%ArrayPrototype%=]. or [=setlike declaration=] is declared. 1. If |object| is not a [=platform object=] that implements |interface|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |callbackFn| be the value of the first argument passed to the function, or undefined if the argument was not supplied. - 1. If [=IsCallable=](|callbackFn|) is false, throw a TypeError. + 1. If [=IsCallable=](|callbackFn|) is false, [=es throw|throw=] a TypeError. 1. Let |thisArg| be the value of the second argument passed to the function, or undefined if the argument was not supplied. 1. Let |backing| be the value of the \[[BackingMap]] [=internal slot=] of |object|, if the interface has a [=maplike declaration=], @@ -11072,7 +11059,7 @@ the initial value of the “forEach” data property of [=%ArrayPrototype%=].

1. Let |forEach| be the result of calling the \[[Get]] internal method of |backing| with “forEach” and |backing| as arguments. - 1. If [=IsCallable=](|forEach|) is false, throw a TypeError. + 1. If [=IsCallable=](|forEach|) is false, [=es throw|throw=] a TypeError. 1. [=Call=](|forEach|, |backing|, «|callbackWrapper|, |thisArg|»). 1. Return undefined. @@ -11151,7 +11138,7 @@ the initial value of the “keys” data property of [=%ArrayPrototype%=]. on which the [=iterable declaration=] is declared on. 1. If |object| is not a [=platform object=] that implements |interface|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |iterator| be a newly created [=default iterator object=] for |interface| with |object| as its target and iterator kind “key”. 1. Return |iterator|. @@ -11200,7 +11187,7 @@ the value of the [=@@iterator=] property. on which the [=iterable declaration=] is declared on. 1. If |object| is not a [=platform object=] that implements |interface|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |iterator| be a newly created [=default iterator object=] for |interface| with |object| as its target and iterator kind “value”. 1. Return |iterator|. @@ -11267,7 +11254,7 @@ must be [=%IteratorPrototype%=]. * the identifier “next”, and * the type “method”. 1. If |object| is not a [=default iterator object=] for |interface|, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |index| be |object|’s index. 1. Let |kind| be |object|’s kind. 1. Let |values| be the list of [=value pairs to iterate over=]. @@ -11333,10 +11320,10 @@ These additional properties are described in the sub-sections below. * the platform object |O|, * an identifier equal to |name|, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |map| be the Map object that is the value of |O|’s \[[BackingMap]] [=internal slot=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |map| passing |name| and |map| as arguments. - 1. If [=IsCallable=](|function|) is false, then throw a TypeError. + 1. If [=IsCallable=](|function|) is false, then [=es throw|throw=] a TypeError. 1. Return [=Call=](|function|, |map|, |arguments|). @@ -11362,7 +11349,7 @@ with the following characteristics: * the platform object |O|, * the identifier “size”, and * the type “getter”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |map| be the Map object that is the value of |O|’s \[[BackingMap]] [=internal slot=]. 1. Return the result of calling the \[[Get]] internal method of |map| passing “size” and |map| as arguments. @@ -11414,7 +11401,7 @@ For both of “get” and “has”, there must exist a property with that name * the platform object |O|, * an identifier equal to |name|, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |map| be the Map object that is the value of |O|’s \[[BackingMap]] [=internal slot=]. 1. Let |keyType| be the key type specified in the [=maplike declaration=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |map| passing |name| and |map| as arguments. @@ -11470,7 +11457,7 @@ must exist on |A|’s * the platform object |O|, * the identifier “delete”, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |map| be the Map object that is the value of |O|’s \[[BackingMap]] [=internal slot=]. 1. Let |keyType| be the key type specified in the [=maplike declaration=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |map| passing “delete” and |map| as arguments. @@ -11505,7 +11492,7 @@ must exist on |A|’s [=interface prototype object=]: * the platform object |O|, * the identifier “set”, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |map| be the Map object that is the value of |O|’s \[[BackingMap]] [=internal slot=]. 1. Let |keyType| and |valueType| be the key and value types specified in the [=maplike declaration=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |map| passing “set” and |map| as arguments. @@ -11553,13 +11540,13 @@ These additional properties are described in the sub-sections below. * an identifier equal to |name|, and * the type “method”. 1. If |O| is not an object that implements A, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Let |set| be the Set object that is the value of |O|’s \[[BackingSet]] [=internal slot=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |set| passing |name| and |set| as arguments. 1. If [=IsCallable=](|function|) is false, - then throw a TypeError. + then [=es throw|throw=] a TypeError. 1. Return [=Call=](|function|, |set|, |arguments|). @@ -11583,7 +11570,7 @@ with the following characteristics: * the platform object |O|, * the identifier “size”, and * the type “getter”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |set| be the Set object that is the value of |O|’s \[[BackingSet]] [=internal slot=]. 1. Return the result of calling the \[[Get]] internal method of |set| passing “size” and |set| as arguments. @@ -11635,7 +11622,7 @@ with the following characteristics: * the platform object |O|, * the identifier “has”, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |set| be the Set object that is the value of |O|’s \[[BackingSet]] [=internal slot=]. 1. Let |type| be the value type specified in the [=setlike declaration=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |set| passing “has” and |set| as arguments. @@ -11676,7 +11663,7 @@ must exist on |A|’s * the platform object |O|, * an identifier equal to |name|, and * the type “method”. - 1. If |O| is not an object that implements A, then throw a TypeError. + 1. If |O| is not an object that implements A, then [=es throw|throw=] a TypeError. 1. Let |set| be the Set object that is the value of |O|’s \[[BackingSet]] [=internal slot=]. 1. Let |type| be the value type specified in the [=setlike declaration=]. 1. Let |function| be the result of calling the \[[Get]] internal method of |set| passing |name| and |set| as arguments. @@ -11759,7 +11746,7 @@ and similarly with their setters. Attempting to call B.prototype.f on an object that implements A (but not B) or one that implements C will result in a - {{TypeError}} being thrown. However, + TypeError being thrown. However, calling A.prototype.f on an object that implements B or one that implements C would succeed. This is handled by the algorithm in [[#es-operations]] @@ -11972,7 +11959,7 @@ and [[#legacy-platform-object-set]]. assuming |arg|0..|n|−1 is the list of argument values passed to \[[Call]]: 1. If |I| has no [=legacy callers=], - throw a TypeError. + [=es throw|throw=] a TypeError. 1. Initialize |S| to the [=effective overload set=] for legacy callers on |I| and with argument count |n|. 1. Let <|operation|, |values|> be the result of passing |S| and @@ -12620,7 +12607,7 @@ on exception objects too.
- When a [=simple exception=] or {{DOMException}} |E| is to be [=thrown=], + When a [=simple exception=] or {{DOMException}} |E| is to be [=throw|thrown=], with [=error name=] |N| and optional user agent-defined message |M|, the following steps must be followed: diff --git a/index.html b/index.html index a1d6b7c3..8ae6fb4a 100644 --- a/index.html +++ b/index.html @@ -1557,7 +1557,7 @@

Web IDL

-

Editor’s Draft,

+

Editor’s Draft,

This version: @@ -4996,73 +4996,62 @@

simple exception, which -is identified by one of the following names:

+is identified by one of the following types:

  • -

    "Error"

    +

    EvalError

  • -

    "EvalError"

    +

    RangeError

  • -

    "RangeError"

    +

    ReferenceError

  • -

    "ReferenceError"

    +

    TypeError

  • -

    "TypeError"

    -
  • -

    "URIError"

    +

    URIError

-

These correspond to all of the ECMAScript error objects (apart from SyntaxError, which is deliberately omitted as -it is for use only by the ECMAScript parser). -The meaning of -each simple exception matches -its corresponding Error object in the +

These correspond to all of the ECMAScript error objects (apart from SyntaxError and Error, +which are deliberately omitted as they are reserved for use +by the ECMAScript parser and by authors, respectively). +The meaning of each simple exception matches +its corresponding error object in the ECMAScript specification.

The second kind of exception is a DOMException, which is an exception that encapsulates a name and an optional integer code, for compatibility with historically defined exceptions in the DOM.

-

For simple exceptions, -the error name is the name -of the exception. -For a DOMException, -the error name must -be one of the names listed in the error names table below. The table also indicates the DOMException's integer code -for that error name, if it has one.

-

There are two types that can be used to refer to -exception objects: Error, which encompasses all exceptions, +

For simple exceptions, the error name is the type of the exception. +For DOMExceptions, the error name must be one of the names +listed in the error names table below. +The table also indicates the DOMException's integer code for that error name, +if it has one.

+

There are two types that can be used to refer to exception objects: Error, which encompasses all exceptions, and DOMException which includes just DOMException objects. This allows for example an operation to be declared to have a DOMException return type or an attribute to be of type Error.

-

Exceptions can be created by providing its error name. -Exceptions can also be thrown, by providing the -same details required to create one.

+

Simple exceptions can be created by providing their error name. DOMExceptions can be created by providing their error name followed by DOMException. +Exceptions can also be thrown, by providing the +same details required to create one.

The resulting behavior from creating and throwing an exception is language binding-specific.

Note: See §3.15 Creating and throwing exceptions for details on what creating and throwing an exception entails in the ECMAScript language binding.

-
- +
+

Here is are some examples of wording to use to create and throw exceptions. - To throw a new simple exception named TypeError:

-
-

Throw a TypeError.

-
-

To throw a new DOMException with error name IndexSizeError:

-
-

Throw an IndexSizeError.

-
-

To create a new DOMException with error name SyntaxError:

-
-

Let object be a newly created SyntaxError.

-
+ To throw a new simple exception named TypeError:

+
Throw a TypeError.
+

To throw a new DOMException with error name "IndexSizeError":

+
Throw an "IndexSizeError" DOMException.
+

To create a new DOMException with error name "SyntaxError":

+
Let object be a newly created "SyntaxError" DOMException.

2.5.1. Error names

The error names table below lists all the allowed error names -for DOMExceptions, a description, and legacy code values.

+for DOMExceptions, a description, and legacy code values.

Note: If an error name is not listed here, please file a bug as indicated at the top of this specification and it will be addressed shortly. Thanks!

Name Description - Legacy code name and value + Legacy code name and value
"IndexSizeError" @@ -5186,7 +5175,7 @@

- Additionally, the following DOMExceptions are kept for legacy purposes but their usage is discouraged: + Additionally, the following DOMExceptions are kept for legacy purposes but their usage is discouraged: @@ -5195,21 +5184,21 @@

"DOMStringSizeError"
DOMSTRING_SIZE_ERR (2) -
Use RangeError. + Use RangeError.
"NoDataAllowedError"
NO_DATA_ALLOWED_ERR (6)
"InvalidAccessError"
INVALID_ACCESS_ERR (15) -
Use TypeError for invalid arguments, - "NotSupportedError" for unsupported operations, and - "NotAllowedError" for denied requests. + Use TypeError for invalid arguments, + "NotSupportedError" DOMException for unsupported operations, and + "NotAllowedError" DOMException for denied requests.
"ValidationError"
VALIDATION_ERR (16)
"TypeMismatchError"
TYPE_MISMATCH_ERR (17) -
Use TypeError. + Use TypeError.

2.6. Enumerations

@@ -5465,7 +5454,7 @@

objects that implement a non-callback interface;

  • -

    objects representing IDL DOMExceptions.

    +

    objects representing IDL DOMExceptions.

    Legacy platform objects are platform objects that implement an interface which does not have a [Global] or [PrimaryGlobal] extended attribute, supports indexed or named properties, @@ -5499,7 +5488,7 @@

    integer types, float, unrestricted float, double and unrestricted double.

    The primitive types are boolean and the numeric types.

    The string types are DOMString, all enumeration types, ByteString and USVString.

    -

    The exception types are Error and DOMException.

    +

    The exception types are Error and DOMException.

    The typed array types are Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, Uint32Array, Uint8ClampedArray, Float32Array and Float64Array.

    The buffer source types are ArrayBuffer, DataView, and the typed array types.

    @@ -6038,15 +6027,15 @@

  • 2.11.28. Error

    The Error type corresponds to the -set of all possible non-null references to exception objects, including simple exceptions and DOMExceptions.

    +set of all possible non-null references to exception objects, including simple exceptions and DOMExceptions.

    There is no way to represent a constant Error value in IDL.

    The type name of the Error type is “Error”.

    2.11.29. DOMException

    -

    The DOMException type corresponds to the +

    The DOMException type corresponds to the set of all possible non-null references to objects -representing DOMExceptions.

    -

    There is no way to represent a constant DOMException value in IDL.

    -

    The type name of the DOMException type is “DOMException”.

    +representing DOMExceptions.

    +

    There is no way to represent a constant DOMException value in IDL.

    +

    The type name of the DOMException type is “DOMException”.

    2.11.30. Buffer source types

    There are a number of types that correspond to sets of all possible non-null references to objects that represent a buffer of data or a view on to a buffer of @@ -6306,7 +6295,7 @@

    The list above needs updating for the latest ES6 draft.

    Algorithms in this section use the conventions described in ECMA-262 section 5.2, such as the use of steps and substeps, the use of mathematical operations, and so on. The ToBoolean, ToNumber, ToUint16, ToInt32, ToUint32, ToString, ToObject, IsAccessorDescriptor and IsDataDescriptor abstract operations and the Type(x) notation referenced in this section are defined in ECMA-262 sections 6 and 7.

    -

    When an algorithm says to throw a SomethingError then this means to construct a new ECMAScript SomethingError object +

    When an algorithm says to throw a SomethingError then this means to construct a new ECMAScript SomethingError object and to throw it, just as the algorithms in ECMA-262 do.

    Note that algorithm steps can call in to other algorithms and abstract operations and not explicitly handle exceptions that are thrown from them. When an exception @@ -6653,12 +6642,12 @@

    If x is NaN, +∞, or −∞, -then throw a TypeError.

    +then throw a TypeError.

  • Set x to ! IntegerPart(x).

  • If x < lowerBound or x > upperBound, -then throw a TypeError.

    +then throw a TypeError.

  • Return x.

    @@ -6704,7 +6693,7 @@

    Let x be ? ToNumber(V).

  • If x is NaN, +∞, or −∞, -then throw a TypeError.

    +then throw a TypeError.

  • Let S be the set of finite IEEE 754 single-precision floating point values except −0, but with two special values added: 2128 and @@ -6714,7 +6703,7 @@

    x, selecting the number with an even significand if there are two equally close values. (The two special values 2128 and −2128 are considered to have even significands for this purpose.)

  • -

    If y is 2128 or −2128, then throw a TypeError.

    +

    If y is 2128 or −2128, then throw a TypeError.

  • If y is +0 and x is negative, return −0.

  • @@ -6773,7 +6762,7 @@

    ? ToNumber(V).

  • If x is NaN, +∞, or −∞, -then throw a TypeError.

    +then throw a TypeError.

  • Return the IDL double value that has the same numeric value as x.

    @@ -6849,7 +6838,7 @@

    Let x be ToString(V).

  • -

    If the value of any element of x is greater than 255, then throw a TypeError.

    +

    If the value of any element of x is greater than 255, then throw a TypeError.

  • Return an IDL ByteString value whose length is the length of x, and where the value of each element is @@ -6887,7 +6876,7 @@

    converted to an IDL object value by running the following algorithm:

    1. -

      If Type(V) is not Object, then throw a TypeError.

      +

      If Type(V) is not Object, then throw a TypeError.

    2. Return the IDL object value that is a reference to the same object as V.

    @@ -6901,14 +6890,14 @@

    converted to an IDL interface type value by running the following algorithm (where I is the interface):

    1. -

      If Type(V) is not Object, then throw a TypeError.

      +

      If Type(V) is not Object, then throw a TypeError.

    2. If V is a platform object that implements I, then return the IDL interface type value that represents a reference to that platform object.

    3. If V is a user object that is considered to implement I according to the rules in §3.10 User objects implementing callback interfaces, then return the IDL interface type value that represents a reference to that user object, with the incumbent settings object as the callback context.

    4. -

      Throw a TypeError.

      +

      Throw a TypeError.

  • The result of converting an IDL interface type value to an ECMAScript value is the Object value that represents a reference to the same object that the IDL interface type value represents.

    @@ -6921,7 +6910,7 @@

    dictionary type):

    1. -

      If Type(V) is not Undefined, Null or Object, then throw a TypeError.

      +

      If Type(V) is not Undefined, Null or Object, then throw a TypeError.

    2. Let dict be an empty dictionary value of type D; every dictionary member is initially considered to be not present.

      @@ -7019,7 +7008,7 @@

      Let S be the result of calling ToString(V).

    3. If S is not one of E’s enumeration values, -then throw a TypeError.

      +then throw a TypeError.

    4. Return the enumeration value of type E that is equal to S.

    @@ -7037,7 +7026,7 @@

    If the result of calling IsCallable(V) is false and the conversion to an IDL value is not being performed due to V being assigned to an attribute whose type is a nullable callback function that is annotated with [TreatNonObjectAsNull], -then throw a TypeError.

    +then throw a TypeError.

  • Return the IDL callback function type value that represents a reference to the same object that V represents, with the incumbent settings object as the callback context.

    @@ -7081,13 +7070,13 @@

    converted to an IDL sequence<T> value as follows:

    1. -

      If V is not an object, throw a TypeError.

      +

      If V is not an object, throw a TypeError.

    2. Let method be the result of GetMethod(V, @@iterator).

    3. ReturnIfAbrupt(method).

    4. -

      If method is undefined, throw a TypeError.

      +

      If method is undefined, throw a TypeError.

    5. Return the result of creating a sequence from V and method.

    @@ -7227,7 +7216,7 @@

    Type(O) is Undefined or Null, return result.

  • -

    If Type(O) is not Object, throw a TypeError.

    +

    If Type(O) is not Object, throw a TypeError.

  • Let keys be ? O.[[OwnPropertyKeys]]().

  • @@ -7391,7 +7380,7 @@

    Let then be the result of calling the internal [[Get]] method of promise with property name “then”.

  • -

    If then is not callable, then throw a TypeError.

    +

    If then is not callable, then throw a TypeError.

  • Return the result of calling then with promise as the this value and onFulfilled and onRejected as its two arguments.

    @@ -7428,10 +7417,10 @@

    -

    If V is a DOMException platform object, then:

    +

    If V is a DOMException platform object, then:

    1. -

      If types includes DOMException or Error, then return the +

      If types includes DOMException or Error, then return the result of converting V to that type.

    2. If types includes object, then return the IDL value @@ -7547,7 +7536,7 @@

      boolean, then return the result of converting V to boolean.

    3. -

      Throw a TypeError.

      +

      Throw a TypeError.

  • An IDL union type value is converted to an ECMAScript value as follows. If the value is an object reference to a special object that represents an ECMAScript undefined value, then it is converted to the ECMAScript undefined value. Otherwise, @@ -7555,14 +7544,14 @@

    3.2.22. Error

    IDL Error values are represented by native ECMAScript Error objects and -platform objects for DOMExceptions.

    +platform objects for DOMExceptions.

    An ECMAScript value V is converted to an IDL Error value by running the following algorithm:

    1. If Type(V) is not Object, or V does not have an [[ErrorData]] internal slot, -then throw a TypeError.

      +then throw a TypeError.

    2. Return the IDL Error value that is a reference to the same object as V.

      @@ -7572,23 +7561,23 @@

      Error represents.

      3.2.23. DOMException

      -

      IDL DOMException values are represented -by platform objects for DOMExceptions.

      +

      IDL DOMException values are represented +by platform objects for DOMExceptions.

      -

      An ECMAScript value V is converted to an IDL DOMException value by running the following algorithm:

      +

      An ECMAScript value V is converted to an IDL DOMException value by running the following algorithm:

      1. If Type(V) is not Object, -or V is not a platform object that represents a DOMException, -then throw a TypeError.

        +or V is not a platform object that represents a DOMException, +then throw a TypeError.

      2. -

        Return the IDL DOMException value that is a reference +

        Return the IDL DOMException value that is a reference to the same object as V.

      -

      The result of converting an IDL DOMException value to an ECMAScript +

      The result of converting an IDL DOMException value to an ECMAScript value is the Object value that represents a reference to the same object that the - IDL DOMException represents.

      + IDL DOMException represents.

      3.2.24. Buffer source types

      Values of the IDL buffer source types are represented by objects of the corresponding ECMAScript class.

      @@ -7598,7 +7587,7 @@

      If Type(V) is not Object, or V does not have an [[ArrayBufferData]] internal slot, or IsDetachedBuffer(V) is true, -then throw a TypeError.

      +then throw a TypeError.

    3. Return the IDL ArrayBuffer value that is a reference to the same object as V.

      @@ -7610,7 +7599,7 @@

      If Type(V) is not Object, or V does not have a [[DataView]] internal slot, -then throw a TypeError.

      +then throw a TypeError.

    4. Return the IDL DataView value that is a reference to the same object as V.

      @@ -7625,7 +7614,7 @@

      If Type(V) is not Object, or V does not have a [[TypedArrayName]] internal slot with a value equal to the name of T, -then throw a TypeError.

      +then throw a TypeError.

    5. Return the IDL value of type T that is a reference to the same object as V.

    @@ -7649,7 +7638,7 @@

    Set arrayBuffer to the value of O’s [[ViewedArrayBuffer]] internal slot.

  • -

    If arrayBuffer is undefined, then throw a TypeError.

    +

    If arrayBuffer is undefined, then throw a TypeError.

  • Set offset to the value of O’s [[ByteOffset]] internal slot.

  • @@ -7658,7 +7647,7 @@

    Otherwise, set length to the value of O’s [[ArrayBufferByteLength]] internal slot.

  • -

    If IsDetachedBuffer(O), then throw a TypeError.

    +

    If IsDetachedBuffer(O), then throw a TypeError.

  • Let data be the value of O’s [[ArrayBufferData]] internal slot.

  • @@ -8944,7 +8933,7 @@

    Remove from S all entries whose type list is not of length argcount.

  • -

    If S is empty, then throw a TypeError.

    +

    If S is empty, then throw a TypeError.

  • Initialize d to −1.

  • @@ -9019,11 +9008,11 @@

    -

    Otherwise: if V is a DOMException platform object and +

    Otherwise: if V is a DOMException platform object and there is an entry in S that has one of the following types at position i of its type list,

  • -

    If O is not an object that implements the interface on which the stringifier was declared, then throw a TypeError.

    +

    If O is not an object that implements the interface on which the stringifier was declared, then throw a TypeError.

  • Let V be an uninitialized variable.

  • @@ -10116,7 +10105,7 @@
    the type “method”.

  • -

    If O is not an object that implements the interface on which the serializer was declared, then throw a TypeError.

    +

    If O is not an object that implements the interface on which the serializer was declared, then throw a TypeError.

  • Depending on how serializer was specified:

    @@ -10256,7 +10245,7 @@
    interface the iterable declaration is on.

  • If object is not a platform object that implements interface, -then throw a TypeError.

    +then throw a TypeError.

  • Let iterator be a newly created default iterator object for interface with object as its target and iterator kind “key+value”.

  • @@ -10283,7 +10272,7 @@

    If object is not a platform object that implements the interface on which the maplike declaration or setlike declaration is defined, -then throw a TypeError.

    +then throw a TypeError.

  • If the interface has a maplike declaration, then:

      @@ -10392,11 +10381,11 @@
      interface on which the maplike declaration or setlike declaration is declared.

    1. If object is not a platform object that implements interface, -then throw a TypeError.

      +then throw a TypeError.

    2. Let callbackFn be the value of the first argument passed to the function, or undefined if the argument was not supplied.

    3. -

      If IsCallable(callbackFn) is false, throw a TypeError.

      +

      If IsCallable(callbackFn) is false, throw a TypeError.

    4. Let thisArg be the value of the second argument passed to the function, or undefined if the argument was not supplied.

    5. @@ -10420,7 +10409,7 @@

      Let forEach be the result of calling the [[Get]] internal method of backing with “forEach” and backing as arguments.

    6. -

      If IsCallable(forEach) is false, throw a TypeError.

      +

      If IsCallable(forEach) is false, throw a TypeError.

    7. Call(forEach, backing, «callbackWrapper, thisArg»).

    8. @@ -10494,7 +10483,7 @@
      Let interface be the interface on which the iterable declaration is declared on.

    9. If object is not a platform object that implements interface, -then throw a TypeError.

      +then throw a TypeError.

    10. Let iterator be a newly created default iterator object for interface with object as its target and iterator kind “key”.

    11. @@ -10544,7 +10533,7 @@
      Let interface be the interface on which the iterable declaration is declared on.

    12. If object is not a platform object that implements interface, -then throw a TypeError.

      +then throw a TypeError.

    13. Let iterator be a newly created default iterator object for interface with object as its target and iterator kind “value”.

    14. @@ -10595,7 +10584,7 @@

      If object is not a default iterator object for interface, -then throw a TypeError.

      +then throw a TypeError.

    15. Let index be object’s index.

    16. @@ -10693,13 +10682,13 @@

      -

      If O is not an object that implements A, then throw a TypeError.

      +

      If O is not an object that implements A, then throw a TypeError.

    17. Let map be the Map object that is the value of O’s [[BackingMap]] internal slot.

    18. Let function be the result of calling the [[Get]] internal method of map passing name and map as arguments.

    19. -

      If IsCallable(function) is false, then throw a TypeError.

      +

      If IsCallable(function) is false, then throw a TypeError.

    20. Return Call(function, map, arguments).

    @@ -10730,7 +10719,7 @@
    -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let map be the Map object that is the value of O’s [[BackingMap]] internal slot.

  • @@ -10779,7 +10768,7 @@
    the type “method”.

  • -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let map be the Map object that is the value of O’s [[BackingMap]] internal slot.

  • @@ -10836,7 +10825,7 @@
    the type “method”.

  • -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let map be the Map object that is the value of O’s [[BackingMap]] internal slot.

  • @@ -10882,7 +10871,7 @@
    -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let map be the Map object that is the value of O’s [[BackingMap]] internal slot.

  • @@ -10941,7 +10930,7 @@

    If O is not an object that implements A, -then throw a TypeError.

    +then throw a TypeError.

  • Let set be the Set object that is the value of O’s [[BackingSet]] internal slot.

    @@ -10949,7 +10938,7 @@

    If IsCallable(function) is false, -then throw a TypeError.

    +then throw a TypeError.

  • Return Call(function, set, arguments).

    @@ -10980,7 +10969,7 @@
    -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let set be the Set object that is the value of O’s [[BackingSet]] internal slot.

  • @@ -11028,7 +11017,7 @@
    -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let set be the Set object that is the value of O’s [[BackingSet]] internal slot.

  • @@ -11081,7 +11070,7 @@
    the type “method”.

  • -

    If O is not an object that implements A, then throw a TypeError.

    +

    If O is not an object that implements A, then throw a TypeError.

  • Let set be the Set object that is the value of O’s [[BackingSet]] internal slot.

  • @@ -11142,7 +11131,7 @@

    C implements A;

    Attempting to call B.prototype.f on an object that implements A (but not B) or one - that implements C will result in a TypeError being thrown. However, + that implements C will result in a TypeError being thrown. However, calling A.prototype.f on an object that implements B or one that implements C would succeed. This is handled by the algorithm in §3.6.7 Operations that defines how IDL operation invocation works in ECMAScript.

    Similar behavior is required for the getter and setter Function objects that correspond to an IDL attributes, and this is handled in §3.6.6 Attributes.

    @@ -11342,7 +11331,7 @@

    assuming arg0..n−1 is the list of argument values passed to [[Call]]:

    1. -

      If I has no legacy callers, throw a TypeError.

      +

      If I has no legacy callers, throw a TypeError.

    2. Initialize S to the effective overload set for legacy callers on I and with argument count n.

    3. @@ -12002,9 +11991,9 @@

      { [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: false }.

      3.14. Exception objects

      -

      Simple exceptions are represented +

      Simple exceptions are represented by native ECMAScript objects of the corresponding type.

      -

      DOMExceptions are represented by platform objects that inherit from +

      DOMExceptions are represented by platform objects that inherit from the DOMException prototype object.

      Every platform object representing a DOMException in ECMAScript is associated with a global environment, just as the initial objects are. @@ -12012,8 +12001,8 @@

      new expression, then the global environment of the newly created object is associated with must be the same as for the DOMException constructor object itself.

      The value of the internal [[Prototype]] -property of a DOMException object must be the DOMException prototype object from the global environment the exception object is associated with.

      -

      The class string of a DOMException object +property of a DOMException object must be the DOMException prototype object from the global environment the exception object is associated with.

      +

      The class string of a DOMException object must be “DOMException”.

      Note: The intention is for DOMException objects to be just like the other various native Error objects that the @@ -12049,8 +12038,8 @@

      -

      When a simple exception or DOMException E is to be created, - with error name N and optional user agent-defined message M, +

      When a simple exception or DOMException E is to be created, + with error name N and optional user agent-defined message M, the following steps must be followed:

      1. @@ -12061,11 +12050,11 @@

        -

        E is DOMException

        +

        E is DOMException

        args is (undefined, N).

        -

        E is a simple exception

        +

        E is a simple exception

        args is (M)

  • @@ -12075,11 +12064,11 @@

    -

    E is DOMException

    +

    E is DOMException

    X is the DOMException constructor object from the global environment G.

    -

    E is a simple exception

    +

    E is a simple exception

    X is the constructor for the corresponding ECMAScript error from the global environment G.

    @@ -12092,12 +12081,12 @@

    -

    When a simple exception or DOMException E is to be thrown, - with error name N and optional user agent-defined message M, +

    When a simple exception or DOMException E is to be thrown, + with error name N and optional user agent-defined message M, the following steps must be followed:

    1. -

      Let O be the result of creating the specified exception E with error name N and +

      Let O be the result of creating the specified exception E with error name N and optional user agent-defined message M.

    2. Throw O.

      @@ -12751,12 +12740,7 @@

      enumeration, in §2.6
    3. Enumeration types, in §2.11.20
    4. enumeration value, in §2.6 -
    5. - Error - +
    6. Error, in §2.11.27
    7. error name, in §2.5
    8. error names table, in §2.5.1
    9. es throw, in §3 @@ -12972,7 +12956,6 @@

      takes an identifier list, in §2.12
    10. takes no arguments, in §2.12
    11. throw, in §2.5 -
    12. thrown, in §2.5
    13. TIMEOUT_ERR, in §2.5.1
    14. TimeoutError, in §2.5.1
    15. TransactionInactiveError, in §2.5.1 @@ -14199,48 +14182,54 @@

      I +