From e7f714043a95f66c115ccf61eb7adbf929da7ce7 Mon Sep 17 00:00:00 2001
From: ExE Boss
interface Entry {
- readonly attribute unsigned short entryType;
+ readonly attribute uint16 entryType;
// ...
};
@@ -1728,7 +1728,7 @@ on which they appear. It is language binding specific whether
@@ -1992,7 +1992,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]
@@ -2137,8 +2137,8 @@ language bindings.
[Exposed=Window]
interface A {
- const short rambaldi = 47;
+ const uint16 rambaldi = 47;
};
@@ -1784,8 +1784,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]
@@ -2149,7 +2149,7 @@ language bindings.
// Overloaded operations.
undefined setDimensions(Dimensions size);
- undefined setDimensions(unsigned long width, unsigned long height);
+ undefined setDimensions(uint32 width, uint32 height);
};
@@ -2187,10 +2187,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);
};
@@ -2528,7 +2528,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();
};
@@ -2612,8 +2612,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]
@@ -2720,7 +2720,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;
};
@@ -2746,7 +2746,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;
@@ -2831,7 +2831,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);
@@ -2856,7 +2856,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);
@@ -2865,7 +2865,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);
@@ -2884,7 +2884,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.
@@ -2931,17 +2931,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);
};
@@ -2979,7 +2979,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);
};
@@ -3009,10 +3009,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);
@@ -3197,7 +3197,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);
};
@@ -3374,7 +3374,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.
@@ -3469,23 +3469,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 »)
»
@@ -3867,14 +3867,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);
};
@@ -3883,7 +3883,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);
};
@@ -3898,7 +3898,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);
};
@@ -3979,7 +3979,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);
};
@@ -3990,13 +3990,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);
};
@@ -4818,7 +4818,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;
};
@@ -4945,23 +4945,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;
};
@@ -5637,14 +5637,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=],
@@ -5763,6 +5763,14 @@ type.
"byte"
"octet"
"bigint"
+ "uint8"
+ "uint16"
+ "uint32"
+ "uint64"
+ "int8"
+ "int16"
+ "int32"
+ "int64"
@@ -5829,8 +5837,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}}
@@ -5871,108 +5879,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 with 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 with 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 with 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 with 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 with 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 with 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 with 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 with 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
@@ -6056,7 +6120,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
@@ -6109,7 +6173,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}}.
(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)?
.
@@ -6469,8 +6533,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)>
.
@@ -6556,8 +6620,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.
[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; };@@ -6602,7 +6666,7 @@ The following extended attributes are applicable
[Exposed=Window] interface I { - attribute [XAttr] (long or Node) attrib; + attribute [XAttr] (int32 or Node) attrib; };@@ -6617,7 +6681,7 @@ The following extended attributes are applicable
[Exposed=Window] interface I { - undefined f([XAttr] long attrib); + undefined f([XAttr] int32 attrib); };@@ -6635,7 +6699,7 @@ The following extended attributes are applicable
dictionary D { - [XAttr] long member; + [XAttr] int32 member; };@@ -6648,7 +6712,7 @@ The following extended attributes are applicable
- typedef [XAttr] long xlong; + typedef [XAttr] int32 xlong;
[B, A] long?
is "LongOrNullAB".
+ The [=type name=] for a type of the form [B, A] int32?
is "LongOrNullAB".
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].
-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].
-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
").
- 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].
-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
").
- 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].
-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
").
- 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}}.
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.
@@ -9270,21 +9342,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. @@ -9406,7 +9478,7 @@ that [=has default method steps=] defined. [Exposed=Window] interface Animal { attribute DOMString name; - attribute unsigned short age; + attribute uint16 age; [Default] object toJSON(); }; @@ -9484,21 +9556,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:@@ -14493,7 +14565,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; }; @@ -14577,33 +14649,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; }; @@ -14653,7 +14725,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.@@ -10054,7 +10126,7 @@ is to be implemented. [Exposed=Window] interface Person { [PutForwards=full] readonly attribute Name name; - attribute unsigned short age; + attribute uint16 age; };@@ -10120,7 +10192,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(); };@@ -10621,13 +10693,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); };@@ -10748,14 +10820,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); };@@ -10963,7 +11035,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) @@ -14927,8 +14999,8 @@ text is “a1”, it is tokenized as a single
long
",
+Thus, the input text “int32” is tokenized as the quoted terminal symbol
+int32
",
and “.” is tokenized as the quoted terminal symbol
a = b + obj.f()
@@ -15023,7 +15095,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;
};