Skip to content

Commit 726ecde

Browse files
committed
Editorial: use Type(x) where appropriate.
Fixes #222.
1 parent 0b1a510 commit 726ecde

File tree

2 files changed

+37
-40
lines changed

2 files changed

+37
-40
lines changed

index.bs

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7641,8 +7641,7 @@ that correspond to the union’s [=member types=].
76417641
then return the IDL value <emu-val>null</emu-val>.
76427642
1. Let |types| be the [=flattened member types=]
76437643
of the [=union type=].
7644-
1. If |V| is <emu-val>null</emu-val> or
7645-
<emu-val>undefined</emu-val>, then:
7644+
1. If |V| is <emu-val>null</emu-val> or <emu-val>undefined</emu-val>, then:
76467645
1. If |types| includes a [=dictionary type=], then return the
76477646
result of [=converted to an IDL value|converting=] |V| to that dictionary type.
76487647
1. If |types| includes a [=record type=], then return the
@@ -7659,25 +7658,25 @@ that correspond to the union’s [=member types=].
76597658
|V| to that type.
76607659
1. If |types| includes {{object}}, then return the IDL value
76617660
that is a reference to the object |V|.
7662-
1. If |V| is a native <emu-val>Error</emu-val> object (that is, it has an \[[ErrorData]] [=internal slot=]), then:
7661+
1. If [=Type=](|V|) is Object and |V| has an \[[ErrorData]] [=internal slot=]), then:
76637662
1. If |types| includes {{Error!!interface}}, then return the
76647663
result of [=converted to an IDL value|converting=]
76657664
|V| to {{Error!!interface}}.
76667665
1. If |types| includes {{object}}, then return the IDL value
76677666
that is a reference to the object |V|.
7668-
1. If |V| is an object with an \[[ArrayBufferData]] [=internal slot=], then:
7667+
1. If [=Type=](|V|) is Object and |V| has an \[[ArrayBufferData]] [=internal slot=], then:
76697668
1. If |types| includes {{ArrayBuffer}}, then return the
76707669
result of [=converted to an IDL value|converting=]
76717670
|V| to {{ArrayBuffer}}.
76727671
1. If |types| includes {{object}}, then return the IDL value
76737672
that is a reference to the object |V|.
7674-
1. If |V| is an object with a \[[DataView]] [=internal slot=], then:
7673+
1. If [=Type=](|V|) is Object and |V| has a \[[DataView]] [=internal slot=], then:
76757674
1. If |types| includes {{DataView}}, then return the
76767675
result of [=converted to an IDL value|converting=]
76777676
|V| to {{DataView}}.
76787677
1. If |types| includes {{object}}, then return the IDL value
76797678
that is a reference to the object |V|.
7680-
1. If |V| is an object with a \[[TypedArrayName]] [=internal slot=], then:
7679+
1. If [=Type=](|V|) is Object and |V| has a \[[TypedArrayName]] [=internal slot=], then:
76817680
1. If |types| includes a [=typed array type=]
76827681
whose name is the value of |V|’s \[[TypedArrayName]] [=internal slot=], then return the
76837682
result of [=converted to an IDL value|converting=]
@@ -7691,24 +7690,22 @@ that correspond to the union’s [=member types=].
76917690
|V| to that callback function type.
76927691
1. If |types| includes {{object}}, then return the IDL value
76937692
that is a reference to the object |V|.
7694-
1. If |V| is any kind of object, then:
7693+
1. If [=Type=](|V|) is Object, then:
76957694
1. If |types| includes a [=sequence type=], then
76967695
1. Let |method| be the result of
76977696
[=GetMethod=](|V|, [=@@iterator=]).
76987697
1. [=ReturnIfAbrupt=](|method|).
7699-
1. If |method| is not
7700-
<emu-val>undefined</emu-val>,
7698+
1. If |method| is not <emu-val>undefined</emu-val>,
77017699
return the result of
77027700
[=creating a sequence from an iterable|creating a sequence=]
77037701
of that type from |V| and |method|.
77047702
1. If |types| includes a [=frozen array type=], then
7705-
1. Let |method| be the result of
7706-
[=GetMethod=](|V|, [=@@iterator=]).
7703+
1. Let |method| be the result of [=GetMethod=](|V|, [=@@iterator=]).
77077704
1. [=ReturnIfAbrupt=](|method|).
7708-
1. If |method| is not
7709-
<emu-val>undefined</emu-val>,
7705+
1. If |method| is not <emu-val>undefined</emu-val>,
77107706
return the result of
7711-
[=Creating a frozen array from an iterable|creating a frozen array of that type from V and method=].
7707+
[=Creating a frozen array from an iterable|creating a frozen array=]
7708+
of that type from |V| and |method|.
77127709
1. If |types| includes a [=dictionary type=], then return the
77137710
result of [=converted to an IDL value|converting=]
77147711
|V| to that dictionary type.
@@ -7721,11 +7718,11 @@ that correspond to the union’s [=member types=].
77217718
|V| to that interface type.
77227719
1. If |types| includes {{object}}, then return the IDL value
77237720
that is a reference to the object |V|.
7724-
1. If |V| is a <emu-val>Boolean</emu-val> value, then:
7721+
1. If [=Type=](|V|) is Boolean, then:
77257722
1. If |types| includes a {{boolean}},
77267723
then return the result of [=converted to an IDL value|converting=]
77277724
|V| to {{boolean}}.
7728-
1. If |V| is a <emu-val>Number</emu-val> value, then:
7725+
1. If [=Type=](|V|) is Number, then:
77297726
1. If |types| includes a [=numeric type=],
77307727
then return the result of [=converted to an IDL value|converting=]
77317728
|V| to that [=numeric type=].
@@ -9802,7 +9799,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98029799

98039800
then remove from |S| all other entries.
98049801

9805-
1. Otherwise: if |V| is an <emu-val>Error</emu-val> object (that is, it has an \[[ErrorData]] [=internal slot=]) and
9802+
1. Otherwise: if [=Type=](|V|) is Object, |V| has an \[[ErrorData]] [=internal slot=], and
98069803
there is an entry in |S| that has one of the following types at position |i| of its type list,
98079804
* {{Error!!interface}}
98089805
* {{object}}
@@ -9812,7 +9809,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98129809

98139810
then remove from |S| all other entries.
98149811

9815-
1. Otherwise: if |V| is an object with an \[[ArrayBufferData]] [=internal slot=] and
9812+
1. Otherwise: if [=Type=](|V|) is Object, |V| has an \[[ArrayBufferData]] [=internal slot=], and
98169813
there is an entry in |S| that has one of the following types at position |i| of its type list,
98179814
* {{ArrayBuffer}}
98189815
* {{object}}
@@ -9822,7 +9819,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98229819

98239820
then remove from |S| all other entries.
98249821

9825-
1. Otherwise: if |V| is an object with a \[[DataView]] [=internal slot=] and
9822+
1. Otherwise: if [=Type=](|V|) is Object, |V| has a \[[DataView]] [=internal slot=], and
98269823
there is an entry in |S| that has one of the following types at position |i| of its type list,
98279824
* {{DataView}}
98289825
* {{object}}
@@ -9832,7 +9829,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98329829

98339830
then remove from |S| all other entries.
98349831

9835-
1. Otherwise: if |V| is an object with a \[[TypedArrayName]] [=internal slot=] and
9832+
1. Otherwise: if [=Type=](|V|) is Object, |V| has a \[[TypedArrayName]] [=internal slot=], and
98369833
there is an entry in |S| that has one of the following types at position |i| of its type list,
98379834
* a [=typed array type=] whose name
98389835
is equal to the value of |V|’s \[[TypedArrayName]] [=internal slot=]
@@ -9853,7 +9850,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98539850

98549851
then remove from |S| all other entries.
98559852

9856-
1. Otherwise: if |V| is any kind of object, and
9853+
1. Otherwise: if [=Type=](|V|) is Object and
98579854
there is an entry in |S| that has one of the
98589855
following types at position |i| of its type list,
98599856
* a [=sequence type=]
@@ -9871,7 +9868,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98719868
|method| is not <emu-val>undefined</emu-val>, then remove from |S| all
98729869
other entries.
98739870

9874-
1. Otherwise: if |V| is any kind of object, and
9871+
1. Otherwise: if [=Type=](|V|) is Object and
98759872
there is an entry in |S| that has one of the following types at position |i| of its type list,
98769873
* a [=callback interface=] type
98779874
* a [=dictionary type=]
@@ -9883,7 +9880,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98839880

98849881
then remove from |S| all other entries.
98859882

9886-
1. Otherwise: if |V| is a <emu-val>Boolean</emu-val> value,
9883+
1. Otherwise: if [=Type=](|V|) is Boolean
98879884
and there is an entry in |S| that has one of the following types at position |i| of its type list,
98889885
* {{boolean}}
98899886
* a [=nullable type|nullable=] {{boolean}}
@@ -9892,7 +9889,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
98929889

98939890
then remove from |S| all other entries.
98949891

9895-
1. Otherwise: if |V| is a <emu-val>Number</emu-val> value,
9892+
1. Otherwise: if [=Type=](|V|) is Number
98969893
and there is an entry in |S| that has one of the following types at position |i| of its type list,
98979894
* a [=numeric type=]
98989895
* a [=nullable type|nullable=] [=numeric type=]

0 commit comments

Comments
 (0)