diff --git a/index.bs b/index.bs index dad9508ec..119e65643 100644 --- a/index.bs +++ b/index.bs @@ -403,7 +403,7 @@ commonly used on the web, ECMAScript, are consistently specified with low enough precision as to result in interoperability issues. In addition, each specification must describe the same basic information, such as DOM interfaces described in IDL corresponding to properties -on the ECMAScript global object, or the {{unsigned long}} IDL type mapping to the Number +on the ECMAScript global object, or the {{uint32}} IDL type mapping to the Number type in ECMAScript. This specification defines an IDL language similar to OMG IDL @@ -499,8 +499,8 @@ in [[#es-extended-attributes]]. [Exposed=Window] interface GraphicalWindow { constructor(); - readonly attribute unsigned long width; - readonly attribute unsigned long height; + readonly attribute uint32 width; + readonly attribute uint32 height; attribute Paint currentPaint; @@ -722,7 +722,7 @@ across [=IDL fragments=]. interface A { }; - typedef sequence<long> SequenceOfLongs; + typedef sequence<int32> SequenceOfLongs; @@ -1260,7 +1260,7 @@ No [=extended attributes=] defined in this specification are applicable to [=inc
interface Entry { - readonly attribute unsigned short entryType; + readonly attribute uint16 entryType; // ... }; @@ -1727,7 +1727,7 @@ on which they appear. It is language binding specific whether@@ -1991,7 +1991,7 @@ are applicable only to regular attributes: readonly attribute DOMString name; // An attribute whose value can be assigned to. - attribute unsigned short age; + attribute uint16 age; }; [Exposed=Window] @@ -2136,8 +2136,8 @@ language bindings.[Exposed=Window] interface A { - const short rambaldi = 47; + const uint16 rambaldi = 47; };@@ -1783,8 +1783,8 @@ The following extended attributes are applicable to constants: [Exposed=Window] interface Util { const boolean DEBUG = false; - const octet LF = 10; - const unsigned long BIT_MASK = 0x0000fc00; + const uint8 LF = 10; + const uint32 BIT_MASK = 0x0000fc00; const double AVOGADRO = 6.022e23; };
[Exposed=Window] interface Dimensions { - attribute unsigned long width; - attribute unsigned long height; + attribute uint32 width; + attribute uint32 height; }; [Exposed=Window] @@ -2148,7 +2148,7 @@ language bindings. // Overloaded operations. undefined setDimensions(Dimensions size); - undefined setDimensions(unsigned long width, unsigned long height); + undefined setDimensions(uint32 width, uint32 height); };@@ -2186,10 +2186,10 @@ when the
[Exposed=Window] interface IntegerSet { - readonly attribute unsigned long cardinality; + readonly attribute uint32 cardinality; - undefined union(long... ints); - undefined intersection(long... ints); + undefined union(int32... ints); + undefined intersection(int32... ints); };@@ -2527,7 +2527,7 @@ in which case the [=default toJSON steps=] are exposed instead. readonly attribute DOMString to; readonly attribute double amount; readonly attribute DOMString description; - readonly attribute unsigned long number; + readonly attribute uint32 number; TransactionJSON toJSON(); }; @@ -2611,8 +2611,8 @@ See [[#interface-object]] for details on how a [=constructor operation=] is to b
[Exposed=Window] interface NodeList { - Node item(unsigned long index); - readonly attribute unsigned long length; + Node item(uint32 index); + readonly attribute uint32 length; }; [Exposed=Window] @@ -2719,7 +2719,7 @@ On a given [=interface=], there must exist at most one stringifier. [Exposed=Window] interface Student { constructor(); - attribute unsigned long id; + attribute uint32 id; stringifier attribute DOMString name; };@@ -2745,7 +2745,7 @@ On a given [=interface=], there must exist at most one stringifier. [Exposed=Window] interface Student { constructor(); - attribute unsigned long id; + attribute uint32 id; attribute DOMString? familyName; attribute DOMString givenName; @@ -2830,7 +2830,7 @@ will not be such functionality.
[Exposed=Window] interface Dictionary { - readonly attribute unsigned long propertyCount; + readonly attribute uint32 propertyCount; getter double (DOMString propertyName); setter undefined (DOMString propertyName, double propertyValue); @@ -2855,7 +2855,7 @@ simplify [=method steps=] of an interface’s operations.[Exposed=Window] interface Dictionary { - readonly attribute unsigned long propertyCount; + readonly attribute uint32 propertyCount; getter double getProperty(DOMString propertyName); setter undefined setProperty(DOMString propertyName, double propertyValue); @@ -2864,7 +2864,7 @@ simplify [=method steps=] of an interface’s operations.[Exposed=Window] interface Dictionary { - readonly attribute unsigned long propertyCount; + readonly attribute uint32 propertyCount; double getProperty(DOMString propertyName); undefined setProperty(DOMString propertyName, double propertyValue); @@ -2883,7 +2883,7 @@ take a {{DOMString}} as a property name, known as named property getters and named property setters, -and ones that take an {{unsigned long}} +and ones that take an {{uint32}} as a property index, known as indexed property getters and indexed property setters. @@ -2930,17 +2930,17 @@ Interfaces that [=support indexed properties=] must define an [=integer types|integer-typed=] [=attribute=] named "length
". Indexed property getters must -be declared to take a single {{unsigned long}} argument. +be declared to take a single {{uint32}} argument. Indexed property setters must -be declared to take two arguments, where the first is an {{unsigned long}}. +be declared to take two arguments, where the first is an {{uint32}}.interface interface_identifier { - getter type identifier(unsigned long identifier); - setter type identifier(unsigned long identifier, type identifier); + getter type identifier(uint32 identifier); + setter type identifier(uint32 identifier, type identifier); - getter type (unsigned long identifier); - setter type (unsigned long identifier, type identifier); + getter type (uint32 identifier); + setter type (uint32 identifier, type identifier); };@@ -2978,7 +2978,7 @@ The following requirements apply to the definitions of indexed property getters[Exposed=Window] interface A { - getter DOMString toWord(unsigned long index); + getter DOMString toWord(uint32 index); };@@ -3008,10 +3008,10 @@ The following requirements apply to the definitions of indexed property getters[Exposed=Window] interface OrderedMap { - readonly attribute unsigned long size; + readonly attribute uint32 size; - getter any getByIndex(unsigned long index); - setter undefined setByIndex(unsigned long index, any value); + getter any getByIndex(uint32 index); + setter undefined setByIndex(uint32 index, any value); getter any get(DOMString name); setter undefined set(DOMString name, any value); @@ -3196,7 +3196,7 @@ to an instance of the interface. attribute double cy; attribute double radius; - static readonly attribute long triangulationCount; + static readonly attribute int32 triangulationCount; static Point triangulate(Circle c1, Circle c2, Circle c3); };@@ -3373,7 +3373,7 @@ the same operation or constructor. For [=variadic=] operations and legacy factory functions, the argument on which the ellipsis appears counts as a single argument. - Note: Soundefined f(long x, long... y);
is considered to be declared to take two arguments. + Note: Soundefined f(int32 x, int32... y);
is considered to be declared to take two arguments. 1. Let |max| be max(|maxarg|, |N|). 1. [=set/For each=] operation or extended attribute |X| in |F|: 1. Let |arguments| be the [=list=] of arguments |X| is declared to take. @@ -3468,23 +3468,23 @@ the following algorithm returns true.Dictionary1
(Interface1 or {{long}})?
and
+ (Interface1 or {{int32}})?
and
(Interface2 or {{DOMString}})?
(Interface1 or {{long}}?)
and
+ (Interface1 or {{int32}}?)
and
(Interface2 or {{DOMString}})?
(Interface1 or {{long}}?)
and
+ (Interface1 or {{int32}}?)
and
(Interface2 or {{DOMString}}?)
(Dictionary1 or {{long}})
and
+ (Dictionary1 or {{int32}})
and
(Interface2 or {{DOMString}})?
(Dictionary1 or {{long}})
and
+ (Dictionary1 or {{int32}})
and
(Interface2 or {{DOMString}}?)
« (f1, « DOMString », « required »), - (f2, « long, double, Node, Node », « required, required, required, required »), + (f2, « int32, double, Node, Node », « required, required, required, required »), (f3, « double, double, DOMString, Node », « required, required, required, required ») »@@ -3866,14 +3866,14 @@ determine what Web IDL language feature to use: class="note">This is almost never appropriate API design, and separate operations with distinct names usually are a better choice for such cases. - Suppose there is an operation
calculate()
that accepts a {{long}},
+ Suppose there is an operation calculate()
that accepts a {{int32}},
{{DOMString}}, or CalculatableInterface
(an [=interface type=]) as its
only argument, and returns a value of the same type as its argument. It would be clearer to
write the IDL fragment using [=overloaded=] operations as
interface A { - long calculate(long input); + int32 calculate(int32 input); DOMString calculate(DOMString input); CalculatableInterface calculate(CalculatableInterface input); }; @@ -3882,7 +3882,7 @@ determine what Web IDL language feature to use: than using a [=union type=] with a [=typedef=] as- typedef (long or DOMString or CalculatableInterface) Calculatable; + typedef (int32 or DOMString or CalculatableInterface) Calculatable; interface A { Calculatable calculate(Calculatable input); }; @@ -3897,7 +3897,7 @@ determine what Web IDL language feature to use:interface A { - long calculateNumber(long input); + int32 calculateNumber(int32 input); DOMString calculateString(DOMString input); CalculatableInterface calculateCalculatableInterface(CalculatableInterface input); }; @@ -3978,7 +3978,7 @@ determine what Web IDL language feature to use: different arguments, [=union types=] can sometimes be the only viable solution.- typedef (long long or DOMString or CalculatableInterface) SupportedArgument; + typedef (int64 or DOMString or CalculatableInterface) SupportedArgument; interface A { undefined add(SupportedArgument operand1, SupportedArgument operand2); }; @@ -3989,13 +3989,13 @@ determine what Web IDL language feature to use:interface A { - undefined add(long long operand1, long long operand2); - undefined add(long long operand1, DOMString operand2); - undefined add(long long operand1, CalculatableInterface operand2); - undefined add(DOMString operand1, long long operand2); + undefined add(int64 operand1, int64 operand2); + undefined add(int64 operand1, DOMString operand2); + undefined add(int64 operand1, CalculatableInterface operand2); + undefined add(DOMString operand1, int64 operand2); undefined add(DOMString operand1, DOMString operand2); undefined add(DOMString operand1, CalculatableInterface operand2); - undefined add(CalculatableInterface operand1, long long operand2); + undefined add(CalculatableInterface operand1, int64 operand2); undefined add(CalculatableInterface operand1, DOMString operand2); undefined add(CalculatableInterface operand1, CalculatableInterface operand2); }; @@ -4817,7 +4817,7 @@ as those entries have the correct types, and there are [=map/entries=] present fdictionary Descriptor { DOMString name; - sequence<unsigned long> serviceIdentifiers; + sequence<uint32> serviceIdentifiers; };@@ -4944,23 +4944,23 @@ identifiers.dictionary B : A { - long b; - long a; + int32 b; + int32 a; }; dictionary A { - long c; - long g; + int32 c; + int32 g; }; dictionary C : B { - long e; - long f; + int32 e; + int32 f; }; partial dictionary A { - long h; - long d; + int32 h; + int32 d; };@@ -5571,7 +5571,7 @@ defined in this specification are applicable to [=typedefs=]. The following [=IDL fragment=] demonstrates the use of [=typedefs=] to allow the use of a short - [=identifier=] instead of a long + [=identifier=] instead of a int32 [=sequence type=].@@ -5636,14 +5636,14 @@ corresponding to each type, and how [=constants=] of that type are represented. The following types are known as integer types: -{{byte}}, -{{octet}}, -{{short}}, -{{unsigned short}}, -{{long}}, -{{unsigned long}}, -{{long long}} and -{{unsigned long long}}. +{{int8}}, +{{uint8}}, +{{int16}}, +{{uint16}}, +{{int32}}, +{{uint32}}, +{{int64}} and +{{uint64}}. The following types are known as numeric types: the [=integer types=], @@ -5762,6 +5762,14 @@ type. "byte" "octet" "bigint" + "uint8" + "uint16" + "uint32" + "uint64" + "int8" + "int16" + "int32" + "int64"@@ -5828,8 +5836,8 @@ a discriminated union type, in that each of its values has a specific non-{{any}} type associated with it. For example, one value of the {{any}} type is the -{{unsigned long}} -150, while another is the {{long}} 150. +{{uint32}} +150, while another is the {{int32}} 150. These are distinct values. The particular type of an {{any}} @@ -5870,108 +5878,164 @@ The [=type name=] of the {{boolean}} type is "Boolean
". -byte
+int8
-The {{byte}} type is a signed integer +The {{int8}} type is a signed integer type that has values in the range [−128, 127]. -{{byte}} constant values in IDL are +{{int8}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{byte}} type is "Byte
". +{{int8}} type is "Int8
". +For legacy compatibility,byte
is to be treated +as an alias for {{int8}}, similar to: -octet
++ typedef (int8) byte; ++ + +uint8
-The {{octet}} type is an unsigned integer +The {{uint8}} type is an unsigned integer type that has values in the range [0, 255]. -{{octet}} constant values in IDL are +{{uint8}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{octet}} type is "Octet
". +{{uint8}} type is "Uint8
". + +For legacy compatibility,octet
is to be treated +as an alias for {{uint8}}, similar to: + ++ typedef (uint8) octet; +-short
+int16
-The {{short}} type is a signed integer +The {{int16}} type is a signed integer type that has values in the range [−32768, 32767]. -{{short}} constant values in IDL are +{{int16}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{short}} type is "Short
". +{{int16}} type is "Int16
". +For legacy compatibility,short
is to be treated +as an alias for {{int16}}, similar to: -unsigned short
++ typedef (int16) short; ++ + +uint16
-The {{unsigned short}} type is an unsigned integer +The {{uint16}} type is an unsigned integer type that has values in the range [0, 65535]. -{{unsigned short}} constant values in IDL are +{{uint16}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{unsigned short}} type is "UnsignedShort
". +{{uint16}} type is "Uint16
". + +For legacy compatibility,unsigned short
is to be treated +as an alias for {{uint16}}, similar to: + ++ typedef (uint16) unsigned short; +-long
+int32
-The {{long}} type is a signed integer +The {{int32}} type is a signed integer type that has values in the range [−2147483648, 2147483647]. -{{long}} constant values in IDL are +{{int32}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{long}} type is "Long
". +{{int32}} type is "Int32
". +For legacy compatibility,long
is to be treated +as an alias for {{int32}}, similar to: -unsigned long
++ typedef (int32) long; ++ + +uint32
-The {{unsigned long}} type is an unsigned integer +The {{uint32}} type is an unsigned integer type that has values in the range [0, 4294967295]. -{{unsigned long}} constant values in IDL are +{{uint32}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{unsigned long}} type is "UnsignedLong
". +{{uint32}} type is "Uint32
". + +For legacy compatibility,unsigned long
is to be treated +as an alias for {{uint32}}, similar to: + ++ typedef (uint32) unsigned long; +-long long
+int64
-The {{long long}} type is a signed integer +The {{int64}} type is a signed integer type that has values in the range [−9223372036854775808, 9223372036854775807]. -{{long long}} constant values in IDL are +{{int64}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{long long}} type is "LongLong
". +{{int64}} type is "Int64
". +For legacy compatibility,long long
is to be treated +as an alias for {{int64}}, similar to: -unsigned long long
++ typedef (int64) long long; ++ + +uint64
-The {{unsigned long long}} type is an unsigned integer +The {{uint64}} type is an unsigned integer type that has values in the range [0, 18446744073709551615]. -{{unsigned long long}} constant values in IDL are +{{uint64}} constant values in IDL are represented withinteger tokens. The [=type name=] of the -{{unsigned long long}} type is "UnsignedLongLong
". +{{uint64}} type is "Uint64
". + +For legacy compatibility,unsigned long long
is to be treated +as an alias for {{uint64}}, similar to: + ++ typedef (uint64) unsigned long long; +float
@@ -6055,7 +6119,7 @@ the set of all possible sequences of [=code units=]. Such sequences are commonly interpreted as UTF-16 encoded strings [[!RFC2781]] although this is not required. While {{DOMString}} is defined to be -an OMG IDL boxed [=sequence type|sequence=]<{{unsigned short}}> valuetype +an OMG IDL boxed [=sequence type|sequence=]<{{uint16}}> valuetype in [[DOM-LEVEL-3-CORE/core#ID-C74D1578|DOM Level 3 Core §The DOMString Type]], this document defines {{DOMString}} to be an intrinsic type so as to avoid special casing that sequence type @@ -6108,7 +6172,7 @@ The [=type name=] of the {{DOMString}} values, even if it is expected that values of the string will always be in ASCII or some 8 bit character encoding. [=sequence types|Sequences=] or - [=frozen array type|frozen arrays=] with {{octet}} or {{byte}} + [=frozen array type|frozen arrays=] with {{uint8}} or {{int8}} elements, {{Uint8Array}}, or {{Int8Array}} should be used for holding 8 bit data rather than {{ByteString}}. @@ -6433,8 +6497,8 @@ union’s member types. Note that the [=member types=] of a union type do not descend into nested union types. So for -(double or (sequence<long> or Event) or (Node or DOMString)?)
the member types - aredouble
,(sequence<long> or Event)
and +(double or (sequence<int32> or Event) or (Node or DOMString)?)
the member types + aredouble
,(sequence<int32> or Event)
and(Node or DOMString)?
. @@ -6468,8 +6532,8 @@ that matches the value. Note: For example, the [=flattened member types=] of the [=union type=] -(Node or (sequence<long> or Event) or (XMLHttpRequest or DOMString)? or sequence<(sequence<double> or NodeList)>)
-are the six typesNode
,sequence<long>
,Event
, +(Node or (sequence<int32> or Event) or (XMLHttpRequest or DOMString)? or sequence<(sequence<double> or NodeList)>)
+are the six typesNode
,sequence<int32>
,Event
,XMLHttpRequest
,DOMString
andsequence<(sequence<double> or NodeList)>
. @@ -6555,8 +6619,8 @@ the existing types. Such types are called annotated types, and annotate are called inner types.-@@ -6582,15 +6646,15 @@ The following extended attributes are applicable[Clamp] long
defines a new [=annotated type=], whose behavior is based on that of - the [=annotated types/inner type=] {{long}}, but modified as specified by the [{{Clamp}}] +[Clamp] int32
defines a new [=annotated type=], whose behavior is based on that of + the [=annotated types/inner type=] {{int32}}, but modified as specified by the [{{Clamp}}] extended attribute.[Exposed=Window] interface I { - attribute [XAttr] long attrib; - undefined f1(sequence<[XAttr] long> arg); - undefined f2(optional [XAttr] long arg); + attribute [XAttr] int32 attrib; + undefined f1(sequence<[XAttr] int32> arg); + undefined f2(optional [XAttr] int32 arg); - maplike<[XAttr2] DOMString, [XAttr3] long>; + maplike<[XAttr2] DOMString, [XAttr3] int32>; }; dictionary D { - required [XAttr] long member; + required [XAttr] int32 member; };@@ -6601,7 +6665,7 @@ The following extended attributes are applicable[Exposed=Window] interface I { - attribute [XAttr] (long or Node) attrib; + attribute [XAttr] (int32 or Node) attrib; };@@ -6616,7 +6680,7 @@ The following extended attributes are applicable[Exposed=Window] interface I { - undefined f([XAttr] long attrib); + undefined f([XAttr] int32 attrib); };@@ -6634,7 +6698,7 @@ The following extended attributes are applicabledictionary D { - [XAttr] long member; + [XAttr] int32 member; };@@ -6647,7 +6711,7 @@ The following extended attributes are applicable1. Return |extended attributes|. @@ -6661,7 +6725,7 @@ type name of the original type with the set of strings corresponding to the [=id [=extended attribute associated with=] the type, sorted in lexicographic order.- typedef [XAttr] long xlong; + typedef [XAttr] int32 xlong;- The [=type name=] for a type of the form[B, A] long?
is "LongOrNullAB". + The [=type name=] for a type of the form[B, A] int32?
is "LongOrNullAB".Buffer source types
@@ -7039,6 +7103,14 @@ five forms are allowed. "true" "unsigned" "undefined" + "int8" + "int16" + "int32" + "int64" + "uint8" + "uint16" + "uint32" + "uint64" ArgumentNameKeyword BufferRelatedType @@ -7339,179 +7411,179 @@ In effect, where x is a Number value, “operating on x” is shorthand for “operating on the mathematical real number that represents the same numeric value as x”. -byte
+int8
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{byte}} value by running the following algorithm: + to an IDL {{int8}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 8, "-signed
"). - 1. Return the IDL {{byte}} value that represents the same numeric value as |x|. + 1. Return the IDL {{int8}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{byte}} value to an ECMAScript + an IDL {{int8}} value to an ECMAScript value is a Number that represents - the same numeric value as the IDL {{byte}} value. + the same numeric value as the IDL {{int8}} value. The Number value will be an integer in the range [−128, 127].
-octet
+uint8
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{octet}} value by running the following algorithm: + to an IDL {{uint8}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 8, "-unsigned
"). - 1. Return the IDL {{octet}} value that represents the same numeric value as |x|. + 1. Return the IDL {{uint8}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{octet}} value to an ECMAScript + an IDL {{uint8}} value to an ECMAScript value is a Number that represents the same numeric value as the IDL - {{octet}} value. + {{uint8}} value. The Number value will be an integer in the range [0, 255].
-short
+int16
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{short}} value by running the following algorithm: + to an IDL {{int16}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 16, "-signed
"). - 1. Return the IDL {{short}} value that represents the same numeric value as |x|. + 1. Return the IDL {{int16}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{short}} value to an ECMAScript + an IDL {{int16}} value to an ECMAScript value is a Number that represents the same numeric value as the IDL - {{short}} value. + {{int16}} value. The Number value will be an integer in the range [−32768, 32767].
-unsigned short
+uint16
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{unsigned short}} value by running the following algorithm: + to an IDL {{uint16}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 16, "-unsigned
"). - 1. Return the IDL {{unsigned short}} value that represents the same numeric value as |x|. + 1. Return the IDL {{uint16}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{unsigned short}} value to an ECMAScript + an IDL {{uint16}} value to an ECMAScript value is a Number that represents the same numeric value as the IDL - {{unsigned short}} value. + {{uint16}} value. The Number value will be an integer in the range [0, 65535].
-long
+int32
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{long}} value by running the following algorithm: + to an IDL {{int32}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 32, "-signed
"). - 1. Return the IDL {{long}} value that represents the same numeric value as |x|. + 1. Return the IDL {{int32}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{long}} value to an ECMAScript + an IDL {{int32}} value to an ECMAScript value is a Number that represents the same numeric value as the IDL - {{long}} value. + {{int32}} value. The Number value will be an integer in the range [−2147483648, 2147483647].
-unsigned long
+uint32
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{unsigned long}} value by running the following algorithm: + to an IDL {{uint32}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 32, "-unsigned
"). - 1. Return the IDL {{unsigned long}} value that represents the same numeric value as |x|. + 1. Return the IDL {{uint32}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{unsigned long}} value to an ECMAScript + an IDL {{uint32}} value to an ECMAScript value is a Number that represents the same numeric value as the IDL - {{unsigned long}} value. + {{uint32}} value. The Number value will be an integer in the range [0, 4294967295].
-long long
+int64
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{long long}} value by running the following algorithm: + to an IDL {{int64}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 64, "-signed
"). - 1. Return the IDL {{long long}} value that represents the same numeric value as |x|. + 1. Return the IDL {{int64}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{long long}} value to an ECMAScript + an IDL {{int64}} value to an ECMAScript value is a Number value that - represents the closest numeric value to the {{long long}}, + represents the closest numeric value to the {{int64}}, choosing the numeric value with an even significand if there are two [=equally close values=]. - If the {{long long}} is in the range + If the {{int64}} is in the range [−253 + 1, 253 − 1], then the Number will be able to represent exactly the same value as the - {{long long}}. + {{int64}}.
-unsigned long long
+uint64
-+An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{unsigned long long}} value by running the following algorithm: + to an IDL {{uint64}} value by running the following algorithm: 1. Let |x| be [=?=] ConvertToInt(|V|, 64, "-unsigned
"). - 1. Return the IDL {{unsigned long long}} value that represents the same numeric value as |x|. + 1. Return the IDL {{uint64}} value that represents the same numeric value as |x|.+
The result of [=converted to an ECMAScript value|converting=] - an IDL {{unsigned long long}} value to an ECMAScript + an IDL {{uint64}} value to an ECMAScript value is a Number value that - represents the closest numeric value to the {{unsigned long long}}, + represents the closest numeric value to the {{uint64}}, choosing the numeric value with an even significand if there are two [=equally close values=]. - If the {{unsigned long long}} is less than or equal to 253 − 1, + If the {{uint64}} is less than or equal to 253 − 1, then the Number will be able to represent exactly the same value as the - {{unsigned long long}}. + {{uint64}}.
Abstract operations
@@ -7534,7 +7606,7 @@ In effect, where x is a Number value, 1. If |signedness| is "unsigned
", then let |lowerBound| be 0. 1. Otherwise let |lowerBound| be −253 + 1. - Note: this ensures {{long long}} types + Note: this ensures {{int64}} types [=extended attribute associated with|associated with=] [{{EnforceRange}}] or [{{Clamp}}] [=extended attributes=] are representable in ECMAScript's [=Number type=] as unambiguous integers. @@ -9269,21 +9341,21 @@ for the specific requirements that the use of In the following [=IDL fragment=], two [=operations=] are declared that - take three {{octet}} arguments; one uses + take three {{uint8}} arguments; one uses the [{{Clamp}}] [=extended attribute=] on all three arguments, while the other does not:[Exposed=Window] interface GraphicsContext { - undefined setColor(octet red, octet green, octet blue); - undefined setColorClamped([Clamp] octet red, [Clamp] octet green, [Clamp] octet blue); + undefined setColor(uint8 red, uint8 green, uint8 blue); + undefined setColorClamped([Clamp] uint8 red, [Clamp] uint8 green, [Clamp] uint8 blue); };A call tosetColorClamped
with Number values that are out of range for an - {{octet}} are clamped to the range [0, 255]. + {{uint8}} are clamped to the range [0, 255].// Get an instance of GraphicsContext. @@ -9405,7 +9477,7 @@ that [=has default method steps=] defined. [Exposed=Window] interface Animal { attribute DOMString name; - attribute unsigned short age; + attribute uint16 age; [Default] object toJSON(); }; @@ -9483,21 +9555,21 @@ for the specific requirements that the use of In the following [=IDL fragment=], two [=operations=] are declared that - take three {{octet}} arguments; one uses + take three {{uint8}} arguments; one uses the [{{EnforceRange}}] [=extended attribute=] on all three arguments, while the other does not:@@ -14492,7 +14564,7 @@ the exact steps to take if an exception was thrown, or by explicitly [Exposed=Window] interface ExceptionThrower { // This attribute always throws a NotSupportedError and never returns a value. - attribute long valueOf; + attribute int32 valueOf; }; @@ -14576,33 +14648,33 @@ interface DOMException { // but see below note about ECMAScript binding constructor(optional DOMString message = "", optional DOMString name = "Error"); readonly attribute DOMString name; readonly attribute DOMString message; - readonly attribute unsigned short code; - - const unsigned short INDEX_SIZE_ERR = 1; - const unsigned short DOMSTRING_SIZE_ERR = 2; - const unsigned short HIERARCHY_REQUEST_ERR = 3; - const unsigned short WRONG_DOCUMENT_ERR = 4; - const unsigned short INVALID_CHARACTER_ERR = 5; - const unsigned short NO_DATA_ALLOWED_ERR = 6; - const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; - const unsigned short NOT_FOUND_ERR = 8; - const unsigned short NOT_SUPPORTED_ERR = 9; - const unsigned short INUSE_ATTRIBUTE_ERR = 10; - const unsigned short INVALID_STATE_ERR = 11; - const unsigned short SYNTAX_ERR = 12; - const unsigned short INVALID_MODIFICATION_ERR = 13; - const unsigned short NAMESPACE_ERR = 14; - const unsigned short INVALID_ACCESS_ERR = 15; - const unsigned short VALIDATION_ERR = 16; - const unsigned short TYPE_MISMATCH_ERR = 17; - const unsigned short SECURITY_ERR = 18; - const unsigned short NETWORK_ERR = 19; - const unsigned short ABORT_ERR = 20; - const unsigned short URL_MISMATCH_ERR = 21; - const unsigned short QUOTA_EXCEEDED_ERR = 22; - const unsigned short TIMEOUT_ERR = 23; - const unsigned short INVALID_NODE_TYPE_ERR = 24; - const unsigned short DATA_CLONE_ERR = 25; + readonly attribute uint16 code; + + const uint16 INDEX_SIZE_ERR = 1; + const uint16 DOMSTRING_SIZE_ERR = 2; + const uint16 HIERARCHY_REQUEST_ERR = 3; + const uint16 WRONG_DOCUMENT_ERR = 4; + const uint16 INVALID_CHARACTER_ERR = 5; + const uint16 NO_DATA_ALLOWED_ERR = 6; + const uint16 NO_MODIFICATION_ALLOWED_ERR = 7; + const uint16 NOT_FOUND_ERR = 8; + const uint16 NOT_SUPPORTED_ERR = 9; + const uint16 INUSE_ATTRIBUTE_ERR = 10; + const uint16 INVALID_STATE_ERR = 11; + const uint16 SYNTAX_ERR = 12; + const uint16 INVALID_MODIFICATION_ERR = 13; + const uint16 NAMESPACE_ERR = 14; + const uint16 INVALID_ACCESS_ERR = 15; + const uint16 VALIDATION_ERR = 16; + const uint16 TYPE_MISMATCH_ERR = 17; + const uint16 SECURITY_ERR = 18; + const uint16 NETWORK_ERR = 19; + const uint16 ABORT_ERR = 20; + const uint16 URL_MISMATCH_ERR = 21; + const uint16 QUOTA_EXCEEDED_ERR = 22; + const uint16 TIMEOUT_ERR = 23; + const uint16 INVALID_NODE_TYPE_ERR = 24; + const uint16 DATA_CLONE_ERR = 25; }; @@ -14652,7 +14724,7 @@ Their [=deserialization steps=], given value and serializedDOMTimeStamp -[Exposed=Window] interface GraphicsContext { - undefined setColor(octet red, octet green, octet blue); - undefined setColorEnforcedRange([EnforceRange] octet red, [EnforceRange] octet green, [EnforceRange] octet blue); + undefined setColor(uint8 red, uint8 green, uint8 blue); + undefined setColorEnforcedRange([EnforceRange] uint8 red, [EnforceRange] uint8 green, [EnforceRange] uint8 blue); };In an ECMAScript implementation of the IDL, a call to setColorEnforcedRange with Number values that are out of range for an - {{octet}} will result in an exception being + {{uint8}} will result in an exception being thrown.@@ -10053,7 +10125,7 @@ is to be implemented. [Exposed=Window] interface Person { [PutForwards=full] readonly attribute Name name; - attribute unsigned short age; + attribute uint16 age; };@@ -10119,7 +10191,7 @@ for the specific requirements that the use of[Exposed=Window] interface Counter { - [Replaceable] readonly attribute unsigned long value; + [Replaceable] readonly attribute uint32 value; undefined increment(); };@@ -10620,13 +10692,13 @@ for the specific requirements that the use of[Exposed=Window] interface Storage { - undefined addEntry(unsigned long key, any value); + undefined addEntry(uint32 key, any value); }; [Exposed=Window, LegacyNoInterfaceObject] interface Query { - any lookupEntry(unsigned long key); + any lookupEntry(uint32 key); };@@ -10747,14 +10819,14 @@ for the specific requirements that the use of[Exposed=Window] interface StringMap { - readonly attribute unsigned long length; + readonly attribute uint32 length; getter DOMString lookup(DOMString key); }; [Exposed=Window, LegacyOverrideBuiltIns] interface StringMap2 { - readonly attribute unsigned long length; + readonly attribute uint32 length; getter DOMString lookup(DOMString key); };@@ -10962,7 +11034,7 @@ for the specific requirements that the use of [Exposed=Window] interface System { [LegacyUnforgeable] readonly attribute DOMString username; - readonly attribute long long loginTime; + readonly attribute int64 loginTime; };typedef unsigned long long DOMTimeStamp;+typedef uint64 DOMTimeStamp;The {{DOMTimeStamp}} type is used for representing a number of milliseconds, either as an absolute time (relative to some epoch) @@ -14926,8 +14998,8 @@ text is “a1”, it is tokenized as a singleidentifier andinteger . If the longest possible match could match one of the above named terminal symbols or one of the other terminal symbols from the grammar, it must be tokenized as the latter. -Thus, the input text “long” is tokenized as the quoted terminal symbol -long rather than anidentifier called "long
", +Thus, the input text “int32” is tokenized as the quoted terminal symbol +int32 rather than anidentifier called "int32
", and “.” is tokenized as the quoted terminal symbol. rather than another . @@ -14982,7 +15054,7 @@ The following typographic conventions are used in this document: * Grammar terminals:sometoken * Grammar non-terminals:ExampleGrammarNonTerminal * Grammar symbols: identifier -* IDL types: {{unsigned long}} +* IDL types: {{uint32}} * ECMAScript classes: {{ECMAScript/Map}} * ECMAScript language types: Object * Code snippets:a = b + obj.f()
@@ -15022,7 +15094,7 @@ The following typographic conventions are used in this document: // This is an IDL code block. [Exposed=Window] interface Example { - attribute long something; + attribute int32 something; };