diff --git a/index.bs b/index.bs index 41b836b4..c2894ba6 100644 --- a/index.bs +++ b/index.bs @@ -473,8 +473,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; @@ -689,14 +689,14 @@ across [=IDL fragments=].
[Exposed=Window]
interface B : A {
- undefined f(SequenceOfLongs x);
+ undefined f(SequenceOfInt32s x);
};
[Exposed=Window]
interface A {
};
- typedef sequence<long> SequenceOfLongs;
+ typedef sequence<int32> SequenceOfInt32s;
@@ -1234,7 +1234,7 @@ No [=extended attributes=] defined in this specification are applicable to [=inc
interface Entry {
- readonly attribute unsigned short entryType;
+ readonly attribute uint16 entryType;
// ...
};
@@ -1701,7 +1701,7 @@ on which they appear. It is language binding specific whether
[Exposed=Window]
interface A {
- const short rambaldi = 47;
+ const int16 rambaldi = 47;
};
@@ -1757,8 +1757,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;
};
@@ -1969,7 +1969,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]
@@ -2114,8 +2114,8 @@ language bindings.
[Exposed=Window]
interface Dimensions {
- attribute unsigned long width;
- attribute unsigned long height;
+ attribute uint32 width;
+ attribute uint32 height;
};
[Exposed=Window]
@@ -2126,7 +2126,7 @@ language bindings.
// Overloaded operations.
undefined setDimensions(Dimensions size);
- undefined setDimensions(unsigned long width, unsigned long height);
+ undefined setDimensions(uint32 width, uint32 height);
};
@@ -2164,10 +2164,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);
};
@@ -2512,7 +2512,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();
};
@@ -2596,8 +2596,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]
@@ -2704,7 +2704,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;
};
@@ -2730,7 +2730,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;
@@ -2815,7 +2815,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);
@@ -2840,7 +2840,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);
@@ -2849,7 +2849,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);
@@ -2868,7 +2868,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.
@@ -2915,17 +2915,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);
};
@@ -2963,7 +2963,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);
};
@@ -2993,10 +2993,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);
@@ -3181,7 +3181,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);
};
@@ -3358,7 +3358,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: So undefined f(long x, long... y); is considered to be declared to take two arguments.
+ Note: So undefined 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.
@@ -3453,23 +3453,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 »)
»
@@ -3851,14 +3851,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);
};
@@ -3867,7 +3867,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);
};
@@ -3882,7 +3882,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);
};
@@ -3963,7 +3963,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);
};
@@ -3974,13 +3974,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);
};
@@ -4797,7 +4797,7 @@ as those entries have the correct types, and there are [=map/entries=] present f
dictionary Descriptor {
DOMString name;
- sequence<unsigned long> serviceIdentifiers;
+ sequence<uint32> serviceIdentifiers;
};
@@ -4924,23 +4924,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;
};
@@ -5616,14 +5616,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=],
@@ -5735,7 +5735,15 @@ are known as object types.
UnrestrictedFloatType
"boolean"
"byte"
+ "int8"
+ "int16"
+ "int32"
+ "int64"
"octet"
+ "uint8"
+ "uint16"
+ "uint32"
+ "uint64"
"bigint"
@@ -5802,8 +5810,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}}
@@ -5837,78 +5845,99 @@ The {{boolean}} type has two values:
represented with the true and
false tokens.
-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 with integer
tokens.
-octet
+For legacy compatibility, byte is to be treated
+as an alias for {{int8}}.
-The {{octet}} type is an unsigned integer
+uint8
+
+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 with integer
tokens.
-short
+For legacy compatibility, octet is to be treated
+as an alias for {{uint8}}.
+
+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 with integer
tokens.
-unsigned short
+For legacy compatibility, short is to be treated
+as an alias for {{int16}}.
-The {{unsigned short}} type is an unsigned integer
+uint16
+
+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 with integer
tokens.
-long
+For legacy compatibility, unsigned short is to be treated
+as an alias for {{uint16}}.
+
+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 with integer
tokens.
-unsigned long
+For legacy compatibility, long is to be treated
+as an alias for {{int32}}.
-The {{unsigned long}} type is an unsigned integer
+uint32
+
+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 with integer
tokens.
-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 with integer
tokens.
-unsigned long long
+For legacy compatibility, long long is to be treated
+as an alias for {{int64}}.
+
+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 with integer
tokens.
+For legacy compatibility, unsigned long long is to be treated
+as an alias for {{uint64}}.
+
float
The {{float}} type is a floating point numeric
@@ -6011,7 +6040,7 @@ can be set to [=value of string literal tokens|the value=] of a
{{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}}.
@@ -6291,8 +6320,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
- are double, (sequence<long> or Event) and
+ (double or (sequence<int32> or Event) or (Node or DOMString)?) the member types
+ are double, (sequence<int32> or Event) and
(Node or DOMString)?.
@@ -6326,8 +6355,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 types Node, sequence<long>, Event,
+(Node or (sequence<int32> or Event) or (XMLHttpRequest or DOMString)? or sequence<(sequence<double> or NodeList)>)
+are the six types Node, sequence<int32>, Event,
XMLHttpRequest, DOMString and
sequence<(sequence<double> or NodeList)>.
@@ -6409,8 +6438,8 @@ the existing types. Such types are called annotated types, and
annotate are called inner types.
- [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.
@@ -6436,15 +6465,15 @@ The following extended attributes are applicable
[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;
};
@@ -6455,7 +6484,7 @@ The following extended attributes are applicable
[Exposed=Window]
interface I {
- attribute [XAttr] (long or Node) attrib;
+ attribute [XAttr] (int32 or Node) attrib;
};
@@ -6470,7 +6499,7 @@ The following extended attributes are applicable
[Exposed=Window]
interface I {
- undefined f([XAttr] long attrib);
+ undefined f([XAttr] int32 attrib);
};
@@ -6488,7 +6517,7 @@ The following extended attributes are applicable
dictionary D {
- [XAttr] long member;
+ [XAttr] int32 member;
};
@@ -6501,7 +6530,7 @@ The following extended attributes are applicable
- typedef [XAttr] long xlong;
+ typedef [XAttr] int32 xlong;
1. Return |extended attributes|.
@@ -6887,6 +6916,14 @@ five forms are allowed.
"true"
"unsigned"
"undefined"
+ "int8"
+ "int16"
+ "int32"
+ "int64"
+ "uint8"
+ "uint16"
+ "uint32"
+ "uint64"
ArgumentNameKeyword
BufferRelatedType
@@ -7190,179 +7227,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
@@ -7385,7 +7422,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 64-bit [=integer types=]
[=extended attribute associated with|associated with=] [{{EnforceRange}}] or
[{{Clamp}}] [=extended attributes=] are representable in ECMAScript's [=Number type=]
as unambiguous integers.
@@ -9130,21 +9167,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 to setColorClamped 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.
@@ -9266,7 +9303,7 @@ that [=has default method steps=] defined.
[Exposed=Window]
interface Animal {
attribute DOMString name;
- attribute unsigned short age;
+ attribute uint16 age;
[Default] object toJSON();
};
@@ -9344,21 +9381,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:
[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.
@@ -9930,7 +9967,7 @@ is to be implemented.
[Exposed=Window]
interface Person {
[PutForwards=full] readonly attribute Name name;
- attribute unsigned short age;
+ attribute uint16 age;
};
@@ -9996,7 +10033,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();
};
@@ -10497,13 +10534,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);
};
@@ -10624,14 +10661,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);
};
@@ -10839,7 +10876,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;
};
@@ -14468,7 +14505,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;
};
@@ -14552,33 +14589,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;
};
@@ -14894,8 +14931,8 @@ text is “a1”, it is tokenized as a single identifier and integer .
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 an identifier called "long",
+Thus, the input text “int32” is tokenized as the quoted terminal symbol
+int32 rather than an identifier called "int32",
and “.” is tokenized as the quoted terminal symbol
. rather than an other .
@@ -14950,7 +14987,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()
@@ -14990,7 +15027,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;
};