diff --git a/index.html b/index.html index f777c68a..4bbfaead 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@
-Copyright © 2016 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
- This document is the 5 January 2016 Editor’s Draft of the + This document is the 6 January 2016 Editor’s Draft of the Web IDL (Second Edition) specification. Please send comments about this document to @@ -124,7 +124,7 @@
toJSON
method which returns the
serialized value converted
into an ECMAScript value that can be serialized to JSON by the
- JSON.stringify
function. See section 4.5.8.2
+ JSON.stringify
function. See section 4.6.8.2
below for details.
@@ -2747,7 +2747,7 @@
- As described in section 4.7, + As described in section 4.8, an ECMAScript implementation would create properties on a platform object implementing OrderedMap that correspond to @@ -4292,7 +4292,7 @@
- See section 4.12 + See section 4.13 below for details on what creating and throwing an exception entails in the ECMAScript language binding.
@@ -6460,7 +6460,7 @@- See section 4.5.1.1 + See section 4.6.1.1 below for details on how a constructor for an interface is to be implemented, and - section 4.5.3 + section 4.6.3 for how a constructor for a dictionary is to be implemented.
@@ -8764,12 +8764,12 @@See - section 4.5, - section 4.5.3, - section 4.5.6, - section 4.5.7, - section 4.5.8 and - section 4.5.9 + section 4.6, + section 4.6.3, + section 4.6.6, + section 4.6.7, + section 4.6.8 and + section 4.6.9 for the specific requirements that the use of [Exposed] entails.
@@ -8838,7 +8838,7 @@- See section 4.5.8 + See section 4.6.8 for the specific requirements that the use of [ImplicitThis] entails.
@@ -9018,15 +9018,15 @@- See section 4.5.5, - section 4.7.3 and - section 4.7.7 + See section 4.6.5, + section 4.8.3 and + section 4.8.7 for the specific requirements that the use of [Global] and [PrimaryGlobal] entails for named properties, - and section 4.5.6, - section 4.5.7 and - section 4.5.8 + and section 4.6.6, + section 4.6.7 and + section 4.6.8 for the requirements relating to the location of properties corresponding to interface members.
@@ -9114,7 +9114,7 @@- See section 4.5.4 for the + See section 4.6.4 for the specific requirements that the use of [LegacyArrayClass] entails.
@@ -9261,7 +9261,7 @@- See section 4.5.2 + See section 4.6.2 below for details on how named constructors are to be implemented.
@@ -9460,8 +9460,8 @@- See section 4.7.1 - and section 4.7.7 + See section 4.8.1 + and section 4.8.7 for the specific requirements that the use of [OverrideBuiltins] entails.
@@ -9762,7 +9762,7 @@- See section 4.5.7 + See section 4.6.7 for the specific requirements that the use of [Replaceable] entails.
@@ -10110,11 +10110,11 @@- See section 4.5.7, - section 4.5.8, - section 4.7, - section 4.7.1 and - section 4.7.7 + See section 4.6.7, + section 4.6.8, + section 4.8, + section 4.8.1 and + section 4.8.7 for the specific requirements that the use of [Unforgeable] entails.
@@ -10182,7 +10182,7 @@- See section 4.5.4 + See section 4.6.4 for the specific requirements that the use of [Unscopeable] entails.
@@ -10226,8 +10226,433 @@+ In order to define how overloaded function invocations are resolved, the + overload resolution algorithm + is defined. Its input is an effective overload set, + S, and a list of ECMAScript values, arg0..n−1. + Its output is a pair consisting of the operation or + extended attribute of one of S’s entries + and a list of IDL values or the special value “missing”. The algorithm behaves as follows: +
+All entries in S at this point have the same type and optionality value at index i.
This is the argument that will be used to resolve which overload is selected.
+ The overload resolution algorithm performs both the identification + of which overloaded operation, constructor, etc. is being called, + and the conversion of the ECMAScript argument values to their + corresponding IDL values. Informally, it operates as follows. +
+First, the selection of valid overloads is done by considering + the number of ECMAScript arguments that were passed in to the function:
+Once we have a set of possible overloads with the right number + of arguments, the ECMAScript values are converted from left to right. + The nature of the restrictions on overloading means that if we + have multiple possible overloads at this point, then there will + be one position in the argument list that will be used to + distinguish which overload we will finally select; this is + the distinguishing + argument index.
+We first convert the arguments to the left of the distinguishing + argument. (There is a requirement that an argument to the left of + the distinguishing argument index has the same type as in the other + overloads, at the same index.) Then we inspect the type of the + ECMAScript value that is passed in at the distinguishing argument + index to determine which IDL type it may correspond to. + This allows us to select the final overload that will + be invoked. If the value passed in is undefined + and there is an overload with an optional argument at this position, then + we will choose that overload. If there is no valid overload for the type of + value passed in here, then we throw a TypeError. + The inspection of the value at the distinguishing argument index does not have any side effects; + the only side effects that come from running the overload resolution + algorithm are those that come from converting the ECMAScript values + to IDL values.
+At this point, we have determined which overload to use. We now + convert the remaining arguments, from the distinguishing argument onwards, + again ignoring any additional arguments that were ignored due to being passed + after the last possible argument.
+When converting an optional argument’s ECMAScript value to its equivalent IDL value, + undefined will be converted into + the optional argument’s default value, + if it has one, or a special value “missing” otherwise.
+Optional arguments corresponding to a final, variadic argument do not treat + undefined as a special “missing” value, however. + The undefined value is converted to the type + of variadic argument as would be done for a non-optional argument.
+For every interface that @@ -10249,7 +10674,7 @@
The property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. - The characteristics of an interface object are described in section 4.5.1 + The characteristics of an interface object are described in section 4.6.1 below.
@@ -10263,12 +10688,12 @@The interface object for a given non-callback interface @@ -10277,8 +10702,8 @@
@@ -10306,7 +10731,7 @@
If the interface is declared with a @@ -10352,426 +10777,6 @@
- In order to define how overloaded constructor invocations are resolved, the - overload resolution algorithm - is defined. Its input is an effective overload set, - S, and a list of ECMAScript values, arg0..n−1. - Its output is a pair consisting of the operation or - extended attribute of one of S’s entries - and a list of IDL values or the special value “missing”. The algorithm behaves as follows: -
-All entries in S at this point have the same type and optionality value at index i.
This is the argument that will be used to resolve which overload is selected.
- The overload resolution algorithm performs both the identification - of which overloaded operation, constructor, etc. is being called, - and the conversion of the ECMAScript argument values to their - corresponding IDL values. Informally, it operates as follows. -
-First, the selection of valid overloads is done by considering - the number of ECMAScript arguments that were passed in to the function:
-Once we have a set of possible overloads with the right number - of arguments, the ECMAScript values are converted from left to right. - The nature of the restrictions on overloading means that if we - have multiple possible overloads at this point, then there will - be one position in the argument list that will be used to - distinguish which overload we will finally select; this is - the distinguishing - argument index.
-We first convert the arguments to the left of the distinguishing - argument. (There is a requirement that an argument to the left of - the distinguishing argument index has the same type as in the other - overloads, at the same index.) Then we inspect the type of the - ECMAScript value that is passed in at the distinguishing argument - index to determine which IDL type it may correspond to. - This allows us to select the final overload that will - be invoked. If the value passed in is undefined - and there is an overload with an optional argument at this position, then - we will choose that overload. If there is no valid overload for the type of - value passed in here, then we throw a TypeError. - The inspection of the value at the distinguishing argument index does not have any side effects; - the only side effects that come from running the overload resolution - algorithm are those that come from converting the ECMAScript values - to IDL values.
-At this point, we have determined which overload to use. We now - convert the remaining arguments, from the distinguishing argument onwards, - again ignoring any additional arguments that were ignored due to being passed - after the last possible argument.
-When converting an optional argument’s ECMAScript value to its equivalent IDL value, - undefined will be converted into - the optional argument’s default value, - if it has one, or a special value “missing” otherwise.
-Optional arguments corresponding to a final, variadic argument do not treat - undefined as a special “missing” value, however. - The undefined value is converted to the type - of variadic argument as would be done for a non-optional argument.
-The internal [[Call]] method of the interface object behaves as follows, assuming @@ -10852,7 +10857,7 @@
The internal [[HasInstance]] method of every @@ -10881,7 +10886,7 @@
A named constructor @@ -10972,7 +10977,7 @@
For every dictionary type @@ -11056,7 +11061,7 @@
There MUST exist an @@ -11069,15 +11074,15 @@
As with the interface object, the interface prototype object also has properties that correspond to the constants defined on that interface, described in section - 4.5.6 below. + 4.6.6 below.
If the [NoInterfaceObject] @@ -11100,7 +11105,7 @@
For every interface declared with the @@ -11214,7 +11219,7 @@
The internal [[GetOwnProperty]] method of every @@ -11263,7 +11268,7 @@
The internal [[DefineOwnProperty]] method of every @@ -11279,7 +11284,7 @@
The internal [[Delete]] method of every @@ -11351,7 +11356,7 @@
For each unique identifier @@ -11740,7 +11745,7 @@
If the interface @@ -11798,7 +11803,7 @@
If the interface @@ -11922,10 +11927,10 @@
If the interface @@ -12021,7 +12026,7 @@
If the interface has an @@ -12178,7 +12183,7 @@
If the interface has an @@ -12248,7 +12253,7 @@
A default iterator object for a given @@ -12281,7 +12286,7 @@
The iterator prototype object @@ -12370,7 +12375,7 @@
Any object that implements an interface @@ -12409,7 +12414,7 @@
There MUST exist a property named “size” on @@ -12439,7 +12444,7 @@
A property named “entries” MUST exist on @@ -12451,7 +12456,7 @@
For both of “keys” and “values”, there MUST exist a property with that name on @@ -12467,7 +12472,7 @@
For both of “get” and “has”, there MUST exist a property with that name on @@ -12499,7 +12504,7 @@
If A and A’s @@ -12520,7 +12525,7 @@
If A and A’s @@ -12556,7 +12561,7 @@
If A and A’s @@ -12598,7 +12603,7 @@
Any object that implements an interface @@ -12637,7 +12642,7 @@
There MUST exist a property named “size” on @@ -12667,7 +12672,7 @@
A property named “values” MUST exist on @@ -12679,7 +12684,7 @@
For both of “entries” and “keys”, there MUST exist a property with that name on @@ -12695,7 +12700,7 @@
There MUST exist a property with named “has” on @@ -12726,7 +12731,7 @@
For both of “add” and “delete”, if: @@ -12781,7 +12786,7 @@
If A and A’s @@ -12803,7 +12808,7 @@
Some objects, which are attempting to emulate map- and set-like interfaces, will want to accept iterables @@ -12852,7 +12857,7 @@
The interface prototype object @@ -12902,19 +12907,19 @@
A.prototype.f
on an object that implements
B or one that implements C
- would succeed. This is handled by the algorithm in section 4.5.8
+ would succeed. This is handled by the algorithm in section 4.6.8
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 section 4.5.7. + and this is handled in section 4.6.7.
Every platform object is associated with a global environment, just @@ -13104,7 +13109,7 @@
If a platform object implements an interface that @@ -13250,16 +13255,16 @@
Support for getters is handled by the platform object [[GetOwnProperty]] method - defined in section 4.7.3, and + defined in section 4.8.3, and for setters by the platform object [[DefineOwnProperty]] method - defined in section 4.7.7 and the platform object [[Set]] method - defined in section 4.7.6. + defined in section 4.8.7 and the platform object [[Set]] method + defined in section 4.8.6.
The PlatformObjectGetOwnProperty @@ -13336,7 +13341,7 @@
The internal [[GetOwnProperty]] method of every @@ -13357,7 +13362,7 @@
To invoke an indexed property setter with property name P and ECMAScript value @@ -13385,7 +13390,7 @@
To invoke a named property setter with property name P and ECMAScript value @@ -13412,7 +13417,7 @@
The internal [[Set]] method of every @@ -13471,7 +13476,7 @@
The internal [[DefineOwnProperty]] method of every @@ -13558,7 +13563,7 @@
The internal [[Delete]] method of every @@ -13618,7 +13623,7 @@
The internal [[Call]] method of every @@ -13646,7 +13651,7 @@
This document does not define a complete property enumeration order @@ -13677,7 +13682,7 @@
As described in section 3.9 above, @@ -13861,7 +13866,7 @@
An ECMAScript callable object that is being @@ -13934,7 +13939,7 @@
There MUST exist a property on the ECMAScript global object @@ -13946,7 +13951,7 @@
The DOMException constructor object MUST be a function object @@ -13967,7 +13972,7 @@
When the DOMException function is called with arguments message and name, the following steps are taken:
@@ -13994,7 +13999,7 @@The DOMException prototype object MUST @@ -14021,7 +14026,7 @@
Simple exceptions are represented @@ -14064,7 +14069,7 @@
First, we define the current global environment @@ -14209,7 +14214,7 @@
None of the algorithms or processing requirements in the diff --git a/index.xml b/index.xml index 5ab7a5e7..87a943fe 100644 --- a/index.xml +++ b/index.xml @@ -10089,6 +10089,435 @@ with (thing) {
+ In order to define how overloaded function invocations are resolved, the + overload resolution algorithm + is defined. Its input is an effective overload set, + S, and a list of ECMAScript values, arg0..n−1. + Its output is a pair consisting of the operation or + extended attribute of one of S’s entries + and a list of IDL values or the special value “missing”. The algorithm behaves as follows: +
+All entries in S at this point have the same type and optionality value at index i.
This is the argument that will be used to resolve which overload is selected.
+ The overload resolution algorithm performs both the identification + of which overloaded operation, constructor, etc. is being called, + and the conversion of the ECMAScript argument values to their + corresponding IDL values. Informally, it operates as follows. +
+First, the selection of valid overloads is done by considering + the number of ECMAScript arguments that were passed in to the function:
+Once we have a set of possible overloads with the right number + of arguments, the ECMAScript values are converted from left to right. + The nature of the restrictions on overloading means that if we + have multiple possible overloads at this point, then there will + be one position in the argument list that will be used to + distinguish which overload we will finally select; this is + the distinguishing + argument index.
+We first convert the arguments to the left of the distinguishing + argument. (There is a requirement that an argument to the left of + the distinguishing argument index has the same type as in the other + overloads, at the same index.) Then we inspect the type of the + ECMAScript value that is passed in at the distinguishing argument + index to determine which IDL type it may correspond to. + This allows us to select the final overload that will + be invoked. If the value passed in is undefined + and there is an overload with an optional argument at this position, then + we will choose that overload. If there is no valid overload for the type of + value passed in here, then we throw a TypeError. + The inspection of the value at the distinguishing argument index does not have any side effects; + the only side effects that come from running the overload resolution + algorithm are those that come from converting the ECMAScript values + to IDL values.
+At this point, we have determined which overload to use. We now + convert the remaining arguments, from the distinguishing argument onwards, + again ignoring any additional arguments that were ignored due to being passed + after the last possible argument.
+When converting an optional argument’s ECMAScript value to its equivalent IDL value, + undefined will be converted into + the optional argument’s default value, + if it has one, or a special value “missing” otherwise.
+Optional arguments corresponding to a final, variadic argument do not treat + undefined as a special “missing” value, however. + The undefined value is converted to the type + of variadic argument as would be done for a non-optional argument.
+- In order to define how overloaded constructor invocations are resolved, the - overload resolution algorithm - is defined. Its input is an effective overload set, - S, and a list of ECMAScript values, arg0..n−1. - Its output is a pair consisting of the operation or - extended attribute of one of S’s entries - and a list of IDL values or the special value “missing”. The algorithm behaves as follows: -
-All entries in S at this point have the same type and optionality value at index i.
This is the argument that will be used to resolve which overload is selected.
- The overload resolution algorithm performs both the identification - of which overloaded operation, constructor, etc. is being called, - and the conversion of the ECMAScript argument values to their - corresponding IDL values. Informally, it operates as follows. -
-First, the selection of valid overloads is done by considering - the number of ECMAScript arguments that were passed in to the function:
-Once we have a set of possible overloads with the right number - of arguments, the ECMAScript values are converted from left to right. - The nature of the restrictions on overloading means that if we - have multiple possible overloads at this point, then there will - be one position in the argument list that will be used to - distinguish which overload we will finally select; this is - the distinguishing - argument index.
-We first convert the arguments to the left of the distinguishing - argument. (There is a requirement that an argument to the left of - the distinguishing argument index has the same type as in the other - overloads, at the same index.) Then we inspect the type of the - ECMAScript value that is passed in at the distinguishing argument - index to determine which IDL type it may correspond to. - This allows us to select the final overload that will - be invoked. If the value passed in is undefined - and there is an overload with an optional argument at this position, then - we will choose that overload. If there is no valid overload for the type of - value passed in here, then we throw a TypeError. - The inspection of the value at the distinguishing argument index does not have any side effects; - the only side effects that come from running the overload resolution - algorithm are those that come from converting the ECMAScript values - to IDL values.
-At this point, we have determined which overload to use. We now - convert the remaining arguments, from the distinguishing argument onwards, - again ignoring any additional arguments that were ignored due to being passed - after the last possible argument.
-When converting an optional argument’s ECMAScript value to its equivalent IDL value, - undefined will be converted into - the optional argument’s default value, - if it has one, or a special value “missing” otherwise.
-Optional arguments corresponding to a final, variadic argument do not treat - undefined as a special “missing” value, however. - The undefined value is converted to the type - of variadic argument as would be done for a non-optional argument.
-The internal [[Call]] method of the interface object behaves as follows, assuming