Skip to content

Commit f51441c

Browse files
Rename API
1 parent 412dc9d commit f51441c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

spec.bs

+17-17
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,13 @@ The sample code for authenticating the user follows. Note that the example code
360360
presumes access to await/async, for easier to read promise handling.
361361

362362
<pre class="example" id="authentication-example" highlight="js">
363-
/* isSecurePaymentConfirmationAvailable indicates whether the browser */
363+
/* securePaymentConfirmationAvailability indicates whether the browser */
364364
/* supports SPC. It does not indicate whether the user has a credential */
365365
/* ready to go on this device. */
366366
const spcAvailable =
367367
PaymentRequest &&
368-
PaymentRequest.isSecurePaymentConfirmationAvailable &&
369-
(await PaymentRequest.isSecurePaymentConfirmationAvailable()) === 'available';
368+
PaymentRequest.securePaymentConfirmationAvailability &&
369+
(await PaymentRequest.securePaymentConfirmationAvailability()) === 'available';
370370
if (!spcAvailable) {
371371
/* Browser does not support SPC; merchant should fallback to traditional flows. */
372372
}
@@ -659,7 +659,7 @@ A static API is added to {{PaymentRequest}} in order to provide developers a
659659
simplified method of checking whether Secure Payment Confirmation is available.
660660

661661
<xmp class="idl">
662-
enum IsSecurePaymentConfirmationAvailableResult {
662+
enum SecurePaymentConfirmationAvailability {
663663
"available",
664664
"unavailable-unknown-reason",
665665
"unavailable-feature-not-enabled",
@@ -668,16 +668,16 @@ enum IsSecurePaymentConfirmationAvailableResult {
668668
};
669669

670670
partial interface PaymentRequest {
671-
static Promise<IsSecurePaymentConfirmationAvailableResult> isSecurePaymentConfirmationAvailable();
671+
static Promise<SecurePaymentConfirmationAvailability> securePaymentConfirmationAvailability();
672672
};
673673
</xmp>
674674
<dl dfn-type="attribute" dfn-for="PaymentRequest">
675-
: {{PaymentRequest/isSecurePaymentConfirmationAvailable()}}
675+
: {{PaymentRequest/securePaymentConfirmationAvailability()}}
676676
:: Upon invocation, a promise is returned that resolves with one of the
677-
members of {{IsSecurePaymentConfirmationAvailableResult}}, based on the
677+
members of {{SecurePaymentConfirmationAvailability}}, based on the
678678
current availability of the Secure Payment Confirmation feature.
679679
</dl>
680-
<dl dfn-type="enum-value" dfn-for="IsSecurePaymentConfirmationAvailableResult">
680+
<dl dfn-type="enum-value" dfn-for="SecurePaymentConfirmationAvailability">
681681
: <dfn>available</dfn>
682682
:: Indicates that the user agent believes that the Secure Payment
683683
Confirmation API is available in the calling frame.
@@ -712,11 +712,11 @@ initiate a SPC flow:
712712
<pre class="example" id="available-example" highlight="js">
713713
const spcAvailable =
714714
PaymentRequest &&
715-
PaymentRequest.isSecurePaymentConfirmationAvailable &&
716-
await PaymentRequest.isSecurePaymentConfirmationAvailable() === 'available';
715+
PaymentRequest.securePaymentConfirmationAvailability &&
716+
await PaymentRequest.securePaymentConfirmationAvailability() === 'available';
717717
</pre>
718718

719-
NOTE: The use of the static {{PaymentRequest/isSecurePaymentConfirmationAvailable}} method is recommended for
719+
NOTE: The use of the static {{PaymentRequest/securePaymentConfirmationAvailability}} method is recommended for
720720
SPC feature detection, instead of calling {{PaymentRequest/canMakePayment}} on an already-constructed
721721
PaymentRequest object.
722722

@@ -1588,15 +1588,15 @@ they are strong, cross-site identifiers. However in order to obtain them from
15881588
the [=Relying Party=], the merchant already needs an as-strong identifier to
15891589
give to the [=Relying Party=] (e.g., the credit card number).
15901590

1591-
## Fingerprinting via isSecurePaymentConfirmationAvailable ## {#sctn-fingerprinting-via-is-secure-payment-confirmation-available}
1591+
## Fingerprinting via securePaymentConfirmationAvailability ## {#sctn-fingerprinting-via-is-secure-payment-confirmation-available}
15921592

1593-
The {{isSecurePaymentConfirmationAvailable}} API presents a possible
1593+
The {{securePaymentConfirmationAvailability}} API presents a possible
15941594
fingerprinting risk, as it can silently return specific reasons that the
15951595
Secure Payment Confirmation API is not available for a specific frame. These
15961596
reasons are not believed to leak significant information, but should be
15971597
considered:
15981598

1599-
- {{IsSecurePaymentConfirmationAvailableResult/unavailable-feature-not-enabled}}:
1599+
- {{SecurePaymentConfirmationAvailability/unavailable-feature-not-enabled}}:
16001600
some risk of fingerprinting, depending on under what circumstances the user
16011601
agent considers Secure Payment Confirmation to be available or not. User
16021602
agents are encouraged to make Secure Payment Confirmation available to all
@@ -1605,18 +1605,18 @@ considered:
16051605
example, a user agent may ship Secure Payment Confirmation to all users on
16061606
a given OS but not others - this then reduces the fingerprinting risk to
16071607
no more than the user agent string already reveals.
1608-
- {{IsSecurePaymentConfirmationAvailableResult/unavailable-no-permission-policy}}:
1608+
- {{SecurePaymentConfirmationAvailability/unavailable-no-permission-policy}}:
16091609
no (additional) fingerprinting risk, as the "[=payment permission
16101610
string|payment=]" permission policy is already silently detectable by
16111611
attempting to construct a {{PaymentRequest}} object (construction will throw
16121612
an error if the permission policy is not enabled).
1613-
- {{IsSecurePaymentConfirmationAvailableResult/unavailable-no-user-verifying-platform-authenticator}}:
1613+
- {{SecurePaymentConfirmationAvailability/unavailable-no-user-verifying-platform-authenticator}}:
16141614
no (additional) fingerprinting risk over the existing
16151615
{{PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable}} API.
16161616

16171617
In addition to the above considerations, this specification allows a user agent
16181618
to choose to return
1619-
{{IsSecurePaymentConfirmationAvailableResult/unavailable-unknown-reason}} even
1619+
{{SecurePaymentConfirmationAvailability/unavailable-unknown-reason}} even
16201620
when a specific reason is known, should it wish to in order to preserve user
16211621
privacy. This might be done in the case, e.g., that a user agent has detected
16221622
that the current frame has already accessed other APIs that pose a

0 commit comments

Comments
 (0)