@@ -2175,7 +2175,6 @@ <h2>
21752175 readonly attribute DOMString postalCode;
21762176 readonly attribute DOMString recipient;
21772177 readonly attribute DOMString region;
2178- readonly attribute DOMString regionCode;
21792178 readonly attribute DOMString sortingCode;
21802179 readonly attribute FrozenArray<DOMString> addressLine;
21812180 };
@@ -2184,6 +2183,20 @@ <h2>
21842183 The < a > PaymentAddress</ a > interface represents a < a > physical
21852184 address</ a > .
21862185 </ 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 >
21872200 < section >
21882201 < h2 >
21892202 Internal constructor
@@ -2222,83 +2235,6 @@ <h2>
22222235 </ li >
22232236 </ ol >
22242237 </ 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 >
23022238 < li > Let < var > cleanAddressLines</ var > be an empty list.
23032239 </ li >
23042240 < li > If < var > details</ var > ["< a > addressLine</ a > "] is present, then
@@ -2404,17 +2340,6 @@ <h2>
24042340 internal slot.
24052341 </ p >
24062342 </ 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 >
24182343 < section >
24192344 < h2 >
24202345 < dfn > city</ dfn > attribute
@@ -2528,19 +2453,6 @@ <h2>
25282453 Victoria in Australia.
25292454 </ td >
25302455 </ 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 >
25442456 < tr >
25452457 < td >
25462458 < dfn > [[\city]]</ dfn >
@@ -2609,7 +2521,6 @@ <h2>
26092521 DOMString country;
26102522 sequence<DOMString> addressLine;
26112523 DOMString region;
2612- DOMString regionCode;
26132524 DOMString city;
26142525 DOMString dependentLocality;
26152526 DOMString postalCode;
@@ -2643,17 +2554,6 @@ <h2>
26432554 < dd >
26442555 A < a > region</ a > .
26452556 </ 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 >
26572557 < dt >
26582558 < dfn > city</ dfn > member
26592559 </ dt >
@@ -2716,7 +2616,6 @@ <h2>
27162616 DOMString postalCode;
27172617 DOMString recipient;
27182618 DOMString region;
2719- DOMString regionCode;
27202619 DOMString sortingCode;
27212620 };
27222621 </ pre >
@@ -2816,16 +2715,6 @@ <h2>
28162715 provided the < a > PaymentAddress</ a > 's < a data-link-for =
28172716 "PaymentAddress "> region</ a > attribute's value.
28182717 </ 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 >
28292718 < dt >
28302719 < dfn > sortingCode</ dfn > member
28312720 </ dt >
@@ -2924,20 +2813,14 @@ <h2>
29242813 address for a particular country, it might not provide a field
29252814 for the user to input a < a > region</ a > . In such cases, the user
29262815 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).
29312819 </ p >
29322820 < ol >
29332821 < li > Set < var > details</ var > ["< a > region</ a > "] to the user-provided
29342822 region, or to the empty string if none was provided.
29352823 </ 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 >
29412824 </ ol >
29422825 </ li >
29432826 < li > If "sortingCode" is not in < var > redactList</ var > , set
0 commit comments