Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert spec to REC state #1021

Merged
merged 16 commits into from
Jul 8, 2024
Merged
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 44 additions & 42 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ <h2>
|details|)</dfn></code> constructor MUST act as follows:
</p>
<ol class="algorithm">
<li>If the <a>current settings object</a>'s [=relevant global
object=]'s [=associated `Document`=] is not <a>allowed to use</a> the
"[=payment-permission|payment=]" permission, then [=exception/throw=]
a {{"SecurityError"}} {{DOMException}}.
<li>If [=this=]'s [=relevant global object=]'s [=associated
`Document`=] is not <a>allowed to use</a> the <a>"payment"</a>
permission, then [=exception/throw=] a {{"SecurityError"}}
{{DOMException}}.
</li>
<li>Establish the request's id:
<ol>
Expand Down Expand Up @@ -587,17 +587,18 @@ <h2>
</ol>
</li>
<li>If |seenPMIs| [=set/contain|contains=] |pmi| throw a
{{RangeError}} {{DOMException}} optionally letting the
developer this [=payment method identifier=] is a duplicate.
{{RangeError}} {{DOMException}} optionally informing the
developer that this [=payment method identifier=] is a
duplicate.
</li>
<li>[=set/Append=] |pmi| to |seenPMIs|.
</li>
<li>If the {{PaymentMethodData/data}} member of
|paymentMethod| is missing, let |serializedData| be null.
Otherwise, let |serializedData| be the result of
<a>JSON-serializing</a>
|paymentMethod|.{{PaymentMethodData/data}} into a string.
Rethrow any exceptions.
Otherwise, let |serializedData| be the result of [=serialize
a JavaScript value to a JSON string|serialize=]
|paymentMethod|.{{PaymentMethodData/data}} into a JSON
string. Rethrow any exceptions.
</li>
<li>If |serializedData| is not null, and if the specification
that defines the
Expand Down Expand Up @@ -701,9 +702,10 @@ <h2>
<li>If the {{PaymentDetailsModifier/data}} member of
|modifier| is missing, let |serializedData| be null.
Otherwise, let |serializedData| be the result of
<a>JSON-serializing</a>
|modifier|.{{PaymentDetailsModifier/data}} into a string.
Rethrow any exceptions.
[=serialize a JavaScript value to a JSON
string|serialize=]
|modifier|.{{PaymentDetailsModifier/data}} into a JSON
string. Rethrow any exceptions.
</li>
<li>Add the tuple
(|modifier|.{{PaymentDetailsModifier/supportedMethods}},
Expand Down Expand Up @@ -811,6 +813,10 @@ <h2>
not [=Document/fully active=], then return <a>a promise rejected
with</a> an {{"AbortError"}} {{DOMException}}.
</li>
<li>If |document|'s [=Document/visibility state=] is not `"visible"`,
then return <a>a promise rejected with</a> an {{"AbortError"}}
{{DOMException}}.
</li>
<li>
<p>
Optionally, if the <a>user agent</a> wishes to disallow the call
Expand Down Expand Up @@ -1380,8 +1386,8 @@ <h2>
</dt>
<dd>
An object that provides optional information that might be needed by
the supported payment methods. If supplied, it will be
<a>JSON-serialized</a>.
the supported payment methods. If supplied, it will be [=serialize a
JavaScript value to a JSON string|serialized=].
</dd>
</dl>
<p class="note">
Expand Down Expand Up @@ -1733,8 +1739,8 @@ <h2>
</dt>
<dd>
An object that provides optional information that might be needed by
the supported payment methods. If supplied, it will be
<a>JSON-serialized</a>.
the supported payment methods. If supplied, it will be [=serialize a
JavaScript value to a JSON string|serialized=].
</dd>
</dl>
</section>
Expand Down Expand Up @@ -1815,7 +1821,8 @@ <h2>
<dd>
An object that provides optional information that might be needed by
the {{PaymentResponse}} associated [=payment method=]. If supplied,
it will be <a>JSON-serialized</a>.
it will be [=serialize a JavaScript value to a JSON
string|serialize=].
</dd>
</dl>
</section>
Expand Down Expand Up @@ -1924,7 +1931,7 @@ <h2>
|response|.{{PaymentResponse/[[request]]}}.
</li>
<li>Let |document:Document| be |request|'s <a>relevant global
object</a>'s <a>associated Document</a>.
object</a>'s <a>associated `Document`</a>.
</li>
<li data-tests=
"payment-response/rejects_if_not_active-manual.https.html">If
Expand Down Expand Up @@ -1954,8 +1961,8 @@ <h2>
If
|errorFields:PaymentValidationErrors|.{{PaymentValidationErrors/paymentMethod}}
member was passed, and if required by the specification that
defines |response|.{{PaymentResponse/payment}}, then [=converted
to an IDL value|convert=] |errorFields|'s
defines |response|.{{PaymentResponse/methodName}}, then
[=converted to an IDL value|convert=] |errorFields|'s
{{PaymentValidationErrors/paymentMethod}} member to an IDL value
of the type specified there. Otherwise, [=converted to an IDL
value|convert=] to {{object}}.
Expand Down Expand Up @@ -2149,8 +2156,9 @@ <h2>
</li>
<li>Let |promise:Promise| be <a>a new promise</a>.
</li>
<li>Let |serializedData| be the result of <a>JSON-serializing</a>
|details|.{{PaymentCompleteDetails/data}} into a string.
<li>Let |serializedData| be the result of [=serialize a JavaScript
value to a JSON string|serialize=]
|details|.{{PaymentCompleteDetails/data}} into a JSON string.
</li>
<li>If serializing [=exception/throws=] an exception, return <a>a
promise rejected with</a> that exception.
Expand Down Expand Up @@ -2272,9 +2280,9 @@ <h2>
</h2>
<p>
This specification defines a [=policy-controlled feature=] identified
by the string "<code><dfn data-lt="payment-permission" data-nodefault=
"">payment</dfn></code>" [[permissions-policy]]. Its
[=policy-controlled feature/default allowlist=] is '<code>self</code>'.
by the string <dfn class="permission">"payment"</dfn>
[[permissions-policy]]. Its [=policy-controlled feature/default
allowlist=] is [=default allowlist/'self'=].
</p>
<aside class="note">
<p>
Expand Down Expand Up @@ -2701,7 +2709,7 @@ <h2>
|request|.{{PaymentRequest/[[response]]}} if |isRetry| is true, or a
new {{PaymentResponse}} otherwise.
</li>
<li>If |isRetry| if false, initialize the newly created |response|:
<li>If |isRetry| is false, initialize the newly created |response|:
<ol>
<li>Set |response|.{{PaymentResponse/[[request]]}} to |request|.
</li>
Expand Down Expand Up @@ -2909,12 +2917,12 @@ <h2>
</li>
<li>If the {{PaymentDetailsModifier/data}} member of
|modifier| is missing, let |serializedData| be null.
Otherwise, let |serializedData| be the result of <a>
JSON-serializing</a>
|modifier|.{{PaymentDetailsModifier/data}} into a
string. If <a>JSON-serializing</a> throws an
exception, then <a>abort the update</a> with
|request| and that exception.
Otherwise, let |serializedData| be the result of
[=serialize a JavaScript value to a JSON
string|serialize=]
|modifier|.{{PaymentDetailsModifier/data}} into a
JSON string. If it throws an exception, then <a>abort
the update</a> with |request| and that exception.
</li>
<li>Add |serializedData| to |serializedModifierData|.
</li>
Expand Down Expand Up @@ -3214,9 +3222,9 @@ <h2 id="canmakepayment-protections">
The {{PaymentRequest/canMakePayment()}} method provides feature
detection for different payment methods. It may become a
fingerprinting vector if in the future, a large number of payment
methods are available. purposes. User agents are expected to protect
the user from abuse of the method. For example, user agents can
reduce user fingerprinting by:
methods are available. User agents are expected to protect the user
from abuse of the method. For example, user agents can reduce user
fingerprinting by:
</p>
<ul>
<li>Rate-limiting the frequency of calls with different parameters.
Expand Down Expand Up @@ -3268,12 +3276,6 @@ <h2>
The term <dfn data-cite=
"ECMASCRIPT#sec-object-internal-methods-and-internal-slots">internal
slot</dfn> is defined [[ECMASCRIPT]].
<p>
<dfn data-local-lt="JSON-serialized|JSON-serializing" data-export=
"">JSON-serialize</dfn> runs JSON {{JSON/stringify()}}, passing the
supplied object as the sole argument, and returns the resulting
string. This can throw an exception.
</p>
</dd>
</dl>
</section>
Expand Down
Loading