@@ -2175,7 +2175,6 @@ <h2>
2175
2175
readonly attribute DOMString postalCode;
2176
2176
readonly attribute DOMString recipient;
2177
2177
readonly attribute DOMString region;
2178
- readonly attribute DOMString regionCode;
2179
2178
readonly attribute DOMString sortingCode;
2180
2179
readonly attribute FrozenArray<DOMString> addressLine;
2181
2180
};
@@ -2184,6 +2183,20 @@ <h2>
2184
2183
The < a > PaymentAddress</ a > interface represents a < a > physical
2185
2184
address</ a > .
2186
2185
</ p >
2186
+ < aside class ="note " title ="What happened to regionCode? ">
2187
+ < p >
2188
+ This specification once included a < code > regionCode</ code >
2189
+ attribute that provided developers with a [[?ISO3166-2]] country
2190
+ subdivision code element representation of an address' region
2191
+ (e.g., "CA" for California). Unfortunately, the attribute was
2192
+ removed due to lack of implementations. The Web Payments Working
2193
+ Group fully recognizes the importance of the
2194
+ < code > regionCode</ code > attribute and is < a href =
2195
+ "https://github.com/w3c/payment-request/issues/663 "> committed
2196
+ bringing the attribute back</ a > in a future revision of this
2197
+ specification.
2198
+ </ p >
2199
+ </ aside >
2187
2200
< section >
2188
2201
< h2 >
2189
2202
Internal constructor
@@ -2222,83 +2235,6 @@ <h2>
2222
2235
</ li >
2223
2236
</ ol >
2224
2237
</ li >
2225
- < li > If < var > details</ var > ["< a > regionCode</ a > "] is present and not
2226
- the empty string:
2227
- < ol >
2228
- < li > Let < var > regionCode</ var > be the result of < a > strip leading
2229
- and trailing ASCII whitespace</ a > from
2230
- < var > details</ var > ["< a > regionCode</ a > "] and then
2231
- < a data-cite ="INFRA#ascii-uppercase "> ASCII uppercasing</ a >
2232
- the result.
2233
- </ li >
2234
- < li > Let < var > putativeCountrySubdivisionCodeElement</ var > be the
2235
- concatenation of < var > address</ var > .< a > [[\country]]</ a > , a
2236
- single U+002D (-) < a > code point</ a > , and < var > regionCode</ var > .
2237
- </ li >
2238
- < li >
2239
- < p >
2240
- If < var > putativeCountrySubdivisionCodeElement</ var > is not
2241
- a valid < a > country subdivision code element</ a > as per
2242
- [[ISO3166-2]]'s section 5.2 "Structure of country
2243
- subdivision code elements" (non-normative details below),
2244
- throw a < a > RangeError</ a > exception.
2245
- </ p >
2246
- < div class ="note " title =
2247
- "Structure of country subdivision code elements ">
2248
- < p >
2249
- < strong > Do not implement from this note.</ strong > The
2250
- structure of a < a > country subdivision code element</ a > is
2251
- formally defined in [[ISO3166-2]] (section 5.2). Although
2252
- the structure is not expected to change at the time of
2253
- writing, implementers are expected to track updates to
2254
- [[ISO3166-2]] directly from ISO.
2255
- </ p >
2256
- < p >
2257
- As [[ISO3166-2]] is not freely available to the general
2258
- public, the structure of a < a > country subdivision code
2259
- element</ a > at the time of publication is as follows:
2260
- </ p >
2261
- < ul >
2262
- < li > Two < a > code points</ a > that match an [[ISO3166-1]]
2263
- alpha-2 country code.
2264
- </ li >
2265
- < li > A single U+002D (-) < a > code point</ a > .
2266
- </ li >
2267
- < li > One, two, or three < a data-cite =
2268
- "INFRA#ascii-alphanumeric "> ASCII alphanumeric</ a > code
2269
- points, in any order.
2270
- </ li >
2271
- </ ul >
2272
- </ div >
2273
- </ li >
2274
- < li > Set < var > address</ var > .< a > [[\regionCode]]</ a > to
2275
- < var > regionCode</ var > .
2276
- </ li >
2277
- < li > If < var > details</ var > ["< a > region</ a > "] is not present:
2278
- < ol >
2279
- < li > Let < var > region</ var > be the corresponding < a > country
2280
- subdivision name</ a > for < var > regionCode</ var > . Where
2281
- [[ISO3166-2]] defines multiple < a > country subdivision
2282
- names</ a > for a < var > regionCode</ var > , it is RECOMMENDED
2283
- the user agent select one by matching on:
2284
- < ol >
2285
- < li > The < a data-cite ="HTML#language "> language</ a > of
2286
- < a data-cite ="HTML#the-body-element-2 "> the body
2287
- element</ a > .
2288
- </ li >
2289
- < li > The user's preferred languages.
2290
- </ li >
2291
- < li > Any other criteria the user agent deems suitable.
2292
- </ li >
2293
- </ ol >
2294
- </ li >
2295
- < li > Set < var > details</ var > ["< a > region</ a > "] to
2296
- < var > region</ var > .
2297
- </ li >
2298
- </ ol >
2299
- </ li >
2300
- </ ol >
2301
- </ li >
2302
2238
< li > Let < var > cleanAddressLines</ var > be an empty list.
2303
2239
</ li >
2304
2240
< li > If < var > details</ var > ["< a > addressLine</ a > "] is present, then
@@ -2404,17 +2340,6 @@ <h2>
2404
2340
internal slot.
2405
2341
</ p >
2406
2342
</ section >
2407
- < section >
2408
- < h2 >
2409
- < dfn > regionCode</ dfn > attribute
2410
- </ h2 >
2411
- < p data-link-for ="">
2412
- Represents the < a > region</ a > of the address as a code element of an
2413
- [[ISO3166-2]] country subdivision name (e.g., "CA" for California,
2414
- USA). When getting, returns the value of the
2415
- < a > PaymentAddress</ a > 's < a > [[\regionCode]]</ a > internal slot.
2416
- </ p >
2417
- </ section >
2418
2343
< section >
2419
2344
< h2 >
2420
2345
< dfn > city</ dfn > attribute
@@ -2528,19 +2453,6 @@ <h2>
2528
2453
Victoria in Australia.
2529
2454
</ td >
2530
2455
</ tr >
2531
- < tr >
2532
- < td >
2533
- < dfn > [[\regionCode]]</ dfn >
2534
- </ td >
2535
- < td >
2536
- The empty string, or one to three code points that represent a
2537
- < a > region</ a > as the code element of an [[ISO3166-2]] country
2538
- subdivision name (i.e., the characters after the hyphen in an
2539
- ISO3166-2 < a > country subdivision code element</ a > , such as "CA"
2540
- for the state of California in the USA, or "11" for the Lisbon
2541
- district of Portugal).
2542
- </ td >
2543
- </ tr >
2544
2456
< tr >
2545
2457
< td >
2546
2458
< dfn > [[\city]]</ dfn >
@@ -2609,7 +2521,6 @@ <h2>
2609
2521
DOMString country;
2610
2522
sequence<DOMString> addressLine;
2611
2523
DOMString region;
2612
- DOMString regionCode;
2613
2524
DOMString city;
2614
2525
DOMString dependentLocality;
2615
2526
DOMString postalCode;
@@ -2643,17 +2554,6 @@ <h2>
2643
2554
< dd >
2644
2555
A < a > region</ a > .
2645
2556
</ dd >
2646
- < dt >
2647
- < dfn > regionCode</ dfn > member
2648
- </ dt >
2649
- < dd >
2650
- The empty string, or one to three code points that represent a
2651
- < a > region</ a > as the code element of an [[ISO3166-2]] country
2652
- subdivision name (i.e., the characters after the hyphen in an
2653
- ISO3166-2 < a > country subdivision code element</ a > , such as "CA" for
2654
- the state of California in the USA, or "11" for the Lisbon district
2655
- of Portugal).
2656
- </ dd >
2657
2557
< dt >
2658
2558
< dfn > city</ dfn > member
2659
2559
</ dt >
@@ -2716,7 +2616,6 @@ <h2>
2716
2616
DOMString postalCode;
2717
2617
DOMString recipient;
2718
2618
DOMString region;
2719
- DOMString regionCode;
2720
2619
DOMString sortingCode;
2721
2620
};
2722
2621
</ pre >
@@ -2816,16 +2715,6 @@ <h2>
2816
2715
provided the < a > PaymentAddress</ a > 's < a data-link-for =
2817
2716
"PaymentAddress "> region</ a > attribute's value.
2818
2717
</ dd >
2819
- < dt >
2820
- < dfn > regionCode</ dfn > member
2821
- </ dt >
2822
- < dd >
2823
- Denotes that the region code representation of the < a > region</ a >
2824
- has a validation error. In the user agent's UI, this member
2825
- corresponds to the input field that provided the
2826
- < a > PaymentAddress</ a > 's < a data-link-for =
2827
- "PaymentAddress "> regionCode</ a > attribute's value.
2828
- </ dd >
2829
2718
< dt >
2830
2719
< dfn > sortingCode</ dfn > member
2831
2720
</ dt >
@@ -2924,20 +2813,14 @@ <h2>
2924
2813
address for a particular country, it might not provide a field
2925
2814
for the user to input a < a > region</ a > . In such cases, the user
2926
2815
agent returns an empty string for both < a > PaymentAddress</ a > 's
2927
- < a data-link-for ="PaymentAddress "> region</ a > and
2928
- < a data-link-for ="PaymentAddress "> regionCode</ a > attributes - but
2929
- the address can still serve its intended purpose (e.g., be valid
2930
- for shipping or billing purposes).
2816
+ < a data-link-for ="PaymentAddress "> region</ a > attribute - but the
2817
+ address can still serve its intended purpose (e.g., be valid for
2818
+ shipping or billing purposes).
2931
2819
</ p >
2932
2820
< ol >
2933
2821
< li > Set < var > details</ var > ["< a > region</ a > "] to the user-provided
2934
2822
region, or to the empty string if none was provided.
2935
2823
</ li >
2936
- < li > If < var > details</ var > ["< a > region</ a > "] has a corresponding
2937
- < a > country subdivision code element</ a > , set
2938
- < var > details</ var > ["< a > regionCode</ a > "] to that < a > country
2939
- subdivision code element</ a > .
2940
- </ li >
2941
2824
</ ol >
2942
2825
</ li >
2943
2826
< li > If "sortingCode" is not in < var > redactList</ var > , set
0 commit comments