diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 1d7456b63234345..b980b871683a717 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -9818,6 +9818,7 @@ /en-US/docs/Web/API/PaymentResponse/onpayerdetailchange /en-US/docs/Web/API/PaymentResponse/payerdetailchange_event /en-US/docs/Web/API/PaymentResponse/payerdetail_event /en-US/docs/Web/API/PaymentResponse/payerdetailchange_event /en-US/docs/Web/API/PaymentValidationErrors /en-US/docs/Web/API/PaymentResponse/retry +/en-US/docs/Web/API/Payment_Handler_API /en-US/docs/Web/API/Web-Based_Payment_Handler_API /en-US/docs/Web/API/Performance.navigation /en-US/docs/Web/API/Performance/navigation /en-US/docs/Web/API/Performance.now /en-US/docs/Web/API/Performance/now /en-US/docs/Web/API/Performance.now() /en-US/docs/Web/API/Performance/now diff --git a/files/en-us/mozilla/firefox/releases/149/index.md b/files/en-us/mozilla/firefox/releases/149/index.md index 0c594f592e0c960..605e5b970332367 100644 --- a/files/en-us/mozilla/firefox/releases/149/index.md +++ b/files/en-us/mozilla/firefox/releases/149/index.md @@ -62,12 +62,20 @@ Firefox 149 is the current [Beta version of Firefox](https://www.firefox.com/en- #### Media, WebRTC, and Web Audio -- The {{domxref("HTMLMediaElement.captureStream()", "captureStream()")}} method of the {{domxref("HTMLMediaElement")}} interface is now supported. +- The {{domxref("HTMLMediaElement.captureStream()")}} method is now supported. This returns an object that streams the real-time capture of the content in the element. The stream can be used, for example, as a source for a WebRTC {{domxref("RTCPeerConnection")}}. Previously, `captureStream()` was available only as the non-standard `mozCaptureStream()` method. ([Firefox bug 2017708](https://bugzil.la/2017708)). +- {{domxref("MediaElementAudioSourceNode")}} now respects the media element's volume when capturing audio for all types of sources (as required by the specification). + Previously, setting the volume of the element did not affect the captured audio for {{domxref("MediaStream")}} sources. + ([Firefox bug 2010427](https://bugzil.la/2010427)). + +- The {{domxref("HTMLMediaElement.captureStream()", "HTMLMediaElement.mozCaptureStream()")}} method now captures raw audio from the source without applying the media element's volume, regardless of the type of source the media element is playing (as required by the specification). + Prior to this change, the media element's volume affected the volume of the captured stream. + ([Firefox bug 2010427](https://bugzil.la/2010427)). + diff --git a/files/en-us/web/api/canmakepaymentevent/canmakepaymentevent/index.md b/files/en-us/web/api/canmakepaymentevent/canmakepaymentevent/index.md index 283a26e68d6320e..39f397679750438 100644 --- a/files/en-us/web/api/canmakepaymentevent/canmakepaymentevent/index.md +++ b/files/en-us/web/api/canmakepaymentevent/canmakepaymentevent/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.CanMakePaymentEvent.CanMakePaymentEvent --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`CanMakePaymentEvent()`** constructor creates a new {{domxref("CanMakePaymentEvent")}} object instance. @@ -53,7 +53,7 @@ self.addEventListener("canmakepayment", (e) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/canmakepaymentevent/index.md b/files/en-us/web/api/canmakepaymentevent/index.md index 6dc15813bb796d6..a1418d3e64f481e 100644 --- a/files/en-us/web/api/canmakepaymentevent/index.md +++ b/files/en-us/web/api/canmakepaymentevent/index.md @@ -7,9 +7,9 @@ status: browser-compat: api.CanMakePaymentEvent --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} -The **`CanMakePaymentEvent`** interface of the {{domxref("Payment Handler API", "", "", "nocode")}} is the event object for the {{domxref("ServiceWorkerGlobalScope.canmakepayment_event", "canmakepayment")}} event, fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the {{domxref("PaymentRequest.PaymentRequest", "PaymentRequest()")}} constructor. +The **`CanMakePaymentEvent`** interface of the {{domxref("Web-based Payment Handler API", "", "", "nocode")}} is the event object for the {{domxref("ServiceWorkerGlobalScope.canmakepayment_event", "canmakepayment")}} event, fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the {{domxref("PaymentRequest.PaymentRequest", "PaymentRequest()")}} constructor. {{InheritanceDiagram}} @@ -51,7 +51,7 @@ self.addEventListener("canmakepayment", (e) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/canmakepaymentevent/respondwith/index.md b/files/en-us/web/api/canmakepaymentevent/respondwith/index.md index 9b40b1757e810c1..15ba915c7243aac 100644 --- a/files/en-us/web/api/canmakepaymentevent/respondwith/index.md +++ b/files/en-us/web/api/canmakepaymentevent/respondwith/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.CanMakePaymentEvent.respondWith --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`respondWith()`** method of the {{domxref("CanMakePaymentEvent")}} interface enables the service worker to respond appropriately to signal whether it is ready to handle payments. @@ -55,7 +55,7 @@ self.addEventListener("canmakepayment", (e) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/htmlmediaelement/volume/index.md b/files/en-us/web/api/htmlmediaelement/volume/index.md index 009521cc64f255b..74cf83e69215a75 100644 --- a/files/en-us/web/api/htmlmediaelement/volume/index.md +++ b/files/en-us/web/api/htmlmediaelement/volume/index.md @@ -13,8 +13,7 @@ which the media will be played. ## Value -A double values must fall between 0 and 1, where 0 is effectively muted and 1 is the -loudest possible value. +A number between 0 and 1, where 0 is effectively muted, and 1 is the loudest possible value. ## Examples diff --git a/files/en-us/web/api/payment_request_api/using_the_payment_request_api/index.md b/files/en-us/web/api/payment_request_api/using_the_payment_request_api/index.md index ecd1ce3b2b23843..c03119eee0d82a3 100644 --- a/files/en-us/web/api/payment_request_api/using_the_payment_request_api/index.md +++ b/files/en-us/web/api/payment_request_api/using_the_payment_request_api/index.md @@ -311,7 +311,7 @@ request ## Pre-authorizing transactions -Some use cases (e.g., paying for fuel at a service station) involve pre-authorizing payment. One way to do this is through a Payment Handler (see the {{domxref("Payment Handler API", "", "", "nocode")}}). At the time of writing, that specification includes a `canmakepayment` event that a Payment Handler could make use of to return authorization status. +Some use cases (e.g., paying for fuel at a service station) involve pre-authorizing payment. One way to do this is through a Web-based Payment Handler (see the {{domxref("Web-based Payment Handler API", "", "", "nocode")}}). At the time of writing, that specification includes a `canmakepayment` event that a Web-based Payment Handler could make use of to return authorization status. The merchant code would look like this: @@ -337,7 +337,7 @@ paymentRequest }); ``` -The payment handler would include the following code: +The web-based payment handler would include the following code: ```js self.addEventListener("canmakepayment", (evt) => { diff --git a/files/en-us/web/api/paymentmanager/enabledelegations/index.md b/files/en-us/web/api/paymentmanager/enabledelegations/index.md index 63064e1bf1b2d13..5c990e046f16240 100644 --- a/files/en-us/web/api/paymentmanager/enabledelegations/index.md +++ b/files/en-us/web/api/paymentmanager/enabledelegations/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentManager.enableDelegations --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} The **`enableDelegations()`** method of the {{domxref("PaymentManager")}} interface delegates responsibility for providing various parts of the required payment information to the payment app rather than collecting it from the browser (for example, via autofill). @@ -66,7 +66,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/paymentmanager/index.md b/files/en-us/web/api/paymentmanager/index.md index 2c2092ca27b8d37..46893625c1e078f 100644 --- a/files/en-us/web/api/paymentmanager/index.md +++ b/files/en-us/web/api/paymentmanager/index.md @@ -7,9 +7,9 @@ status: browser-compat: api.PaymentManager --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} -The **`PaymentManager`** interface of the {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} is used to manage various aspects of payment app functionality. +The **`PaymentManager`** interface of the {{domxref("Web-based Payment Handler API", "", "", "nocode")}} is used to manage various aspects of payment app functionality. It is accessed via the {{domxref("ServiceWorkerRegistration.paymentManager")}} property. @@ -18,7 +18,7 @@ It is accessed via the {{domxref("ServiceWorkerRegistration.paymentManager")}} p ## Instance properties - {{domxref("PaymentManager.userHint", "userHint")}} {{Experimental_Inline}} - - : Provides a hint for the browser to display along with the payment app's name and icon in the Payment Handler UI. + - : Provides a hint for the browser to display along with the payment app's name and icon in the Web-based Payment Handler UI. ## Instance methods @@ -51,7 +51,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/paymentmanager/userhint/index.md b/files/en-us/web/api/paymentmanager/userhint/index.md index b1a45d661f32885..dd61ce0a6900689 100644 --- a/files/en-us/web/api/paymentmanager/userhint/index.md +++ b/files/en-us/web/api/paymentmanager/userhint/index.md @@ -8,9 +8,9 @@ status: browser-compat: api.PaymentManager.userHint --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} -The **`userHint`** property of the {{domxref("PaymentManager")}} interface provides a hint for the browser to display along with the payment app's name and icon in the Payment Handler UI. +The **`userHint`** property of the {{domxref("PaymentManager")}} interface provides a hint for the browser to display along with the payment app's name and icon in the Web-based Payment Handler UI. ## Value @@ -42,7 +42,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/paymentrequestevent/changepaymentmethod/index.md b/files/en-us/web/api/paymentrequestevent/changepaymentmethod/index.md index b07808e328ae612..3dab271fe5ec2d0 100644 --- a/files/en-us/web/api/paymentrequestevent/changepaymentmethod/index.md +++ b/files/en-us/web/api/paymentrequestevent/changepaymentmethod/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.changePaymentMethod --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`changePaymentMethod()`** method of the {{domxref("PaymentRequestEvent")}} interface is used by the payment handler to get an updated total, given such payment method details as the billing address. diff --git a/files/en-us/web/api/paymentrequestevent/index.md b/files/en-us/web/api/paymentrequestevent/index.md index 95e7b1e0baa1e88..35c37f7f9bd891f 100644 --- a/files/en-us/web/api/paymentrequestevent/index.md +++ b/files/en-us/web/api/paymentrequestevent/index.md @@ -7,9 +7,9 @@ status: browser-compat: api.PaymentRequestEvent --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} -The **`PaymentRequestEvent`** interface of the {{domxref("Payment Handler API", "", "", "nocode")}} is the object passed to a payment handler when a {{domxref("PaymentRequest")}} is made. +The **`PaymentRequestEvent`** interface of the {{domxref("Web-based Payment Handler API", "", "", "nocode")}} is the object passed to a payment handler when a {{domxref("PaymentRequest")}} is made. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/paymentrequestevent/methoddata/index.md b/files/en-us/web/api/paymentrequestevent/methoddata/index.md index 9162245e1bf6f90..3591cbe9698d809 100644 --- a/files/en-us/web/api/paymentrequestevent/methoddata/index.md +++ b/files/en-us/web/api/paymentrequestevent/methoddata/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.methodData --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`methodData`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns an array of diff --git a/files/en-us/web/api/paymentrequestevent/modifiers/index.md b/files/en-us/web/api/paymentrequestevent/modifiers/index.md index 1034ce0ce8e7b91..10580c978cfd3de 100644 --- a/files/en-us/web/api/paymentrequestevent/modifiers/index.md +++ b/files/en-us/web/api/paymentrequestevent/modifiers/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.modifiers --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`modifiers`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns an {{jsxref("Array")}} of `PaymentDetailsModifier` objects containing modifiers for payment details. diff --git a/files/en-us/web/api/paymentrequestevent/openwindow/index.md b/files/en-us/web/api/paymentrequestevent/openwindow/index.md index fb942fde9c5d811..7328f0e630378cc 100644 --- a/files/en-us/web/api/paymentrequestevent/openwindow/index.md +++ b/files/en-us/web/api/paymentrequestevent/openwindow/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.openWindow --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`openWindow()`** method of the {{domxref("PaymentRequestEvent")}} interface opens the specified URL in a new window, only if the given URL is on the same origin as the calling page. It returns a {{jsxref("Promise")}} that resolves with a reference to a {{domxref("WindowClient")}}. diff --git a/files/en-us/web/api/paymentrequestevent/paymentrequestevent/index.md b/files/en-us/web/api/paymentrequestevent/paymentrequestevent/index.md index d975725ccc78097..ad60e736f68dbbb 100644 --- a/files/en-us/web/api/paymentrequestevent/paymentrequestevent/index.md +++ b/files/en-us/web/api/paymentrequestevent/paymentrequestevent/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.PaymentRequestEvent --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`PaymentRequestEvent`** constructor creates a new {{domxref("PaymentRequestEvent")}} object instance. diff --git a/files/en-us/web/api/paymentrequestevent/paymentrequestid/index.md b/files/en-us/web/api/paymentrequestevent/paymentrequestid/index.md index a0c2e7d45c8120a..5fae8a4091b785b 100644 --- a/files/en-us/web/api/paymentrequestevent/paymentrequestid/index.md +++ b/files/en-us/web/api/paymentrequestevent/paymentrequestid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.paymentRequestId --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`paymentRequestId`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns the ID of the diff --git a/files/en-us/web/api/paymentrequestevent/paymentrequestorigin/index.md b/files/en-us/web/api/paymentrequestevent/paymentrequestorigin/index.md index 95a3ec5d17b83c6..0f813298206d567 100644 --- a/files/en-us/web/api/paymentrequestevent/paymentrequestorigin/index.md +++ b/files/en-us/web/api/paymentrequestevent/paymentrequestorigin/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.paymentRequestOrigin --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`paymentRequestOrigin`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns the origin where the diff --git a/files/en-us/web/api/paymentrequestevent/respondwith/index.md b/files/en-us/web/api/paymentrequestevent/respondwith/index.md index 21bf5714422d108..cdff7895be35ecb 100644 --- a/files/en-us/web/api/paymentrequestevent/respondwith/index.md +++ b/files/en-us/web/api/paymentrequestevent/respondwith/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.respondWith --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{AvailableInWorkers("service")}} The **`respondWith()`** method of the {{domxref("PaymentRequestEvent")}} interface prevents the default event handling and allows you to provide a {{jsxref("Promise")}} for a payment handler response object yourself. diff --git a/files/en-us/web/api/paymentrequestevent/toporigin/index.md b/files/en-us/web/api/paymentrequestevent/toporigin/index.md index 30621ac8d42f25d..c24a89a142c62b9 100644 --- a/files/en-us/web/api/paymentrequestevent/toporigin/index.md +++ b/files/en-us/web/api/paymentrequestevent/toporigin/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.topOrigin --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`topOrigin`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns the top-level payee origin where diff --git a/files/en-us/web/api/paymentrequestevent/total/index.md b/files/en-us/web/api/paymentrequestevent/total/index.md index 64ffb66f96d5643..77d7d9f9a1cdd8c 100644 --- a/files/en-us/web/api/paymentrequestevent/total/index.md +++ b/files/en-us/web/api/paymentrequestevent/total/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.PaymentRequestEvent.total --- -{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}} +{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}} The **`total`** read-only property of the {{domxref("PaymentRequestEvent")}} interface returns a `PaymentCurrencyAmount` object containing the total amount being requested for payment. diff --git a/files/en-us/web/api/permissions_api/index.md b/files/en-us/web/api/permissions_api/index.md index b054832328b49c6..1cf0c56ee3f7d4c 100644 --- a/files/en-us/web/api/permissions_api/index.md +++ b/files/en-us/web/api/permissions_api/index.md @@ -58,7 +58,7 @@ A non-exhaustive list of permission-aware APIs includes: - [Local Font Access API](/en-US/docs/Web/API/Local_Font_Access_API): `local-fonts` - [Media Capture and Streams API](/en-US/docs/Web/API/Media_Capture_and_Streams_API): `microphone`, `camera` - [Notifications API](/en-US/docs/Web/API/Notifications_API): `notifications` -- [Payment Handler API](/en-US/docs/Web/API/Payment_Handler_API): `payment-handler` +- [Web-based Payment Handler API](/en-US/docs/Web/API/Web_Based_Payment_Handler_API): `payment-handler` - [Push API](/en-US/docs/Web/API/Push_API): `push` - [Screen Capture API](/en-US/docs/Web/API/Screen_Capture_API): `captured-surface-control`, `display-capture` - [Screen Wake Lock API](/en-US/docs/Web/API/Screen_Wake_Lock_API): `screen-wake-lock` diff --git a/files/en-us/web/api/service_worker_api/index.md b/files/en-us/web/api/service_worker_api/index.md index a2c138ca96adbb3..c1fd92529516e8b 100644 --- a/files/en-us/web/api/service_worker_api/index.md +++ b/files/en-us/web/api/service_worker_api/index.md @@ -146,6 +146,6 @@ In the future, service workers will be able to do several other useful things fo - {{domxref("Content Index API", "", "", "nocode")}} - {{domxref("Cookie Store API", "", "", "nocode")}} - {{domxref("Notifications API", "", "", "nocode")}} - - {{domxref("Payment Handler API", "", "", "nocode")}} + - {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - {{domxref("Push API", "", "", "nocode")}} - {{domxref("Web Periodic Background Synchronization API", "", "", "nocode")}} diff --git a/files/en-us/web/api/serviceworkerglobalscope/canmakepayment_event/index.md b/files/en-us/web/api/serviceworkerglobalscope/canmakepayment_event/index.md index 137dedce0c06719..5ec9247bb392527 100644 --- a/files/en-us/web/api/serviceworkerglobalscope/canmakepayment_event/index.md +++ b/files/en-us/web/api/serviceworkerglobalscope/canmakepayment_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.ServiceWorkerGlobalScope.canmakepayment_event --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers("service")}} The **`canmakepayment`** event of the {{domxref("ServiceWorkerGlobalScope")}} interface is fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the {{domxref("PaymentRequest.PaymentRequest", "PaymentRequest()")}} constructor. @@ -60,7 +60,7 @@ self.addEventListener("canmakepayment", (e) => { ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/serviceworkerglobalscope/paymentrequest_event/index.md b/files/en-us/web/api/serviceworkerglobalscope/paymentrequest_event/index.md index 35bdcdbec61b7f4..350432fa8332485 100644 --- a/files/en-us/web/api/serviceworkerglobalscope/paymentrequest_event/index.md +++ b/files/en-us/web/api/serviceworkerglobalscope/paymentrequest_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.ServiceWorkerGlobalScope.paymentrequest_event --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers("service")}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers("service")}} The **`paymentrequest`** event of the {{domxref("ServiceWorkerGlobalScope")}} interface is fired on a payment app when a payment flow has been initiated on the merchant website via the {{domxref("PaymentRequest.show()")}} method. @@ -66,7 +66,7 @@ See [Receive a payment request event from the merchant](https://web.dev/articles ## See also -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/serviceworkerregistration/paymentmanager/index.md b/files/en-us/web/api/serviceworkerregistration/paymentmanager/index.md index de855bde990250c..17e693ebc757c0c 100644 --- a/files/en-us/web/api/serviceworkerregistration/paymentmanager/index.md +++ b/files/en-us/web/api/serviceworkerregistration/paymentmanager/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.ServiceWorkerRegistration.paymentManager --- -{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers}} +{{APIRef("Web-Based Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers}} The **`paymentManager`** read-only property of the {{domxref("ServiceWorkerRegistration")}} interface returns a payment app's {{domxref("PaymentManager")}} instance, which is used to manage various payment app functionality. @@ -33,7 +33,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { }); ``` -- {{domxref("PaymentManager.userHint")}} is used to provide a hint for the browser to display along with the payment app's name and icon in the Payment Handler UI. +- {{domxref("PaymentManager.userHint")}} is used to provide a hint for the browser to display along with the payment app's name and icon in the Web-based Payment Handler UI. - {{domxref("PaymentManager.enableDelegations()")}} is used to delegate responsibility for providing various parts of the required payment information to the payment app rather than collecting it from within the merchant website. ## Specifications @@ -46,7 +46,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { ## See also -- {{domxref("Payment Handler API", "", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/api/payment_handler_api/index.md b/files/en-us/web/api/web-based_payment_handler_api/index.md similarity index 88% rename from files/en-us/web/api/payment_handler_api/index.md rename to files/en-us/web/api/web-based_payment_handler_api/index.md index 049c5c16122d6d1..e377999597d9004 100644 --- a/files/en-us/web/api/payment_handler_api/index.md +++ b/files/en-us/web/api/web-based_payment_handler_api/index.md @@ -1,17 +1,17 @@ --- -title: Payment Handler API -slug: Web/API/Payment_Handler_API +title: Web-based Payment Handler API +slug: Web/API/Web-Based_Payment_Handler_API page-type: web-api-overview status: - experimental browser-compat: api.PaymentRequestEvent --- -{{DefaultAPISidebar("Payment Handler API")}}{{securecontext_header}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{DefaultAPISidebar("Web-Based Payment Handler API")}}{{securecontext_header}}{{SeeCompatTable}}{{AvailableInWorkers}} -The Payment Handler API provides a standardized set of functionality for web applications to directly handle payments, rather than having to be redirected to a separate site for payment handling. +The Web-based Payment Handler API provides a standardized set of functionality for web applications to directly handle payments, rather than having to be redirected to a separate site for payment handling. -When a merchant website initiates payment via the {{domxref("Payment Request API", "Payment Request API", "", "nocode")}}, the Payment Handler API handles discovery of applicable payment apps, presenting them as choices to the user, opening a payment handler window once a choice has been made to allow the user to enter their payment details, and handling the payment transaction with the payment app. +When a merchant website initiates payment via the {{domxref("Payment Request API", "Payment Request API", "", "nocode")}}, the Web-based Payment Handler API handles discovery of applicable payment apps, presenting them as choices to the user, opening a payment handler window once a choice has been made to allow the user to enter their payment details, and handling the payment transaction with the payment app. Communication with payment apps (authorization, passing of payment credentials) is handled via Service Workers. @@ -85,7 +85,7 @@ From the payment method manifest, the browser gets the URL of the default paymen { "name": "Pay with BobBucks", "short_name": "BobBucks", - "description": "This is an example of the Payment Handler API.", + "description": "This is an example of the Web-based Payment Handler API.", "icons": [ { "src": "images/manifest/icon-192x192.png", @@ -148,7 +148,7 @@ async function checkCanMakePayment() { } ``` -The Payment Handler API adds an additional mechanism to prepare for handling a payment. The {{domxref("ServiceWorkerGlobalScope.canmakepayment_event", "canmakepayment")}} event is fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the {{domxref("PaymentRequest.PaymentRequest", "PaymentRequest()")}} constructor. The service worker can then use the {{domxref("CanMakePaymentEvent.respondWith()")}} method to respond appropriately: +The Web-based Payment Handler API adds an additional mechanism to prepare for handling a payment. The {{domxref("ServiceWorkerGlobalScope.canmakepayment_event", "canmakepayment")}} event is fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the {{domxref("PaymentRequest.PaymentRequest", "PaymentRequest()")}} constructor. The service worker can then use the {{domxref("CanMakePaymentEvent.respondWith()")}} method to respond appropriately: ```js self.addEventListener("canmakepayment", (e) => { @@ -216,7 +216,7 @@ navigator.serviceWorker.register("serviceworker.js").then((registration) => { }); ``` -- {{domxref("PaymentManager.userHint")}} is used to provide a hint for the browser to display along with the payment app's name and icon in the Payment Handler UI. +- {{domxref("PaymentManager.userHint")}} is used to provide a hint for the browser to display along with the payment app's name and icon in the Web-based Payment Handler UI. - {{domxref("PaymentManager.enableDelegations()")}} is used to delegate responsibility for providing various parts of the required payment information to the payment app rather than collecting it from the browser (for example, via autofill). ## Interfaces diff --git a/files/en-us/web/css/reference/values/url_value/index.md b/files/en-us/web/css/reference/values/url_value/index.md index b8bbafa3402003e..0ddfa8e8e5ab383 100644 --- a/files/en-us/web/css/reference/values/url_value/index.md +++ b/files/en-us/web/css/reference/values/url_value/index.md @@ -6,23 +6,72 @@ spec-urls: https://drafts.csswg.org/css-values/#url-value sidebar: cssref --- -The **``** [CSS](/en-US/docs/Web/CSS) [data type](/en-US/docs/Web/CSS/Reference/Values/Data_types) is a pointer to a resource. The resource could be an image, a video, a CSS file, a font file, an SVG feature etc. +The **``** [CSS](/en-US/docs/Web/CSS) [data type](/en-US/docs/Web/CSS/Reference/Values/Data_types) is a pointer to a resource. ## Syntax ```plain - = + = url() ``` ### Values -The value is either of the following: +The value may be an absolute or relative URL. - [``](/en-US/docs/Web/CSS/Reference/Values/url_function) - - : The `url()` function accepts only a URL literal string (with or without quotes). + - : The `url()` function accepts a URL, which may be written as a quoted string or as an unquoted URL token. > [!NOTE] -> The specification defines an alternative function called `src()` that accepts a URL string or a [CSS variable](/en-US/docs/Web/CSS/Reference/Values/var). But no web browser has implemented the function yet. +> The [CSS values and units module](/en-US/docs/Web/CSS/Guides/Values_and_units) also introduces the `src()` function as a `` value. Currently, no browser supports this feature. + +## Description + +The `` data type, written with the [`url()`](/en-US/docs/Web/CSS/Reference/Values/url_function) function, represents a `URL`, which is a pointer to an internal or external resource. The resource can be an image, a video, a CSS file, a font file, an SVG feature, etc. The URL may be absolute or relative. + +```css +/* Relative URL */ +url(styles.css) +url(assets/icon.svg) +url("../assets/image.png") + +/* Absolute URL */ +url(http://example.com/fonts/myFont.ttf) +url("https://example.com/images/background.jpg") + +/* Data URL */ +url("data:image/svg+xml,%3Csvg'%3E%3Cpath d='M10 10h60' stroke='%2300F' stroke-width='5'/%3E%3Cpath d='M10 20h60' stroke='%230F0' stroke-width='5'/%3E%3C/svg%3E") + url("data:image/png;base64,iVBORw0KGgoAAA...") +``` + +### External resources and CORS + +The ability to import external resources via the `` value is implementation-defined and often restricted for security reasons. + +Depending on the CSS property on which a `` referencing external resources is applied, the resource may be subject to [Cross-Origin Resource Sharing (CORS)](/en-US/docs/Web/HTTP/Guides/CORS) restrictions. + +Some CSS properties, including {{cssxref("mask-image")}}, {{cssxref("filter")}}, as well as {{cssxref("clip-path")}} and a few others when referring to {{htmlelement("svg")}} image elements, may require successful CORS validation when they cause external, cross-origin resources to be fetched in CORS mode. If CORS validation fails, the resource may be blocked and therefore not used for rendering. + +Note that the `` value type does not enforce CORS validation itself, but individual CSS properties do. + +When opening an HTML file directly with `file://`, resources may fail because CORS rules apply locally. Modern browsers treat `file://` as a unique origin, meaning cross-file resources can get blocked. In this case, an [HTTP server](/en-US/docs/Learn_web_development/Howto/Tools_and_setup/set_up_a_local_testing_server) may be hosted to avoid CORS errors. The security behavior of `file://` URLs also varies depending on the browser and the operating system's file permissions. + +## Examples + +Relative URL + +```css +body { + background-image: url("images/background.jpg"); +} +``` + +Absolute URL + +```css +body { + background-image: url("https://example.com/images/background.jpg"); +} +``` ## Specifications diff --git a/files/en-us/web/http/reference/headers/content-type/index.md b/files/en-us/web/http/reference/headers/content-type/index.md index 5f2ee52d64bb7f9..81ea4696af511e5 100644 --- a/files/en-us/web/http/reference/headers/content-type/index.md +++ b/files/en-us/web/http/reference/headers/content-type/index.md @@ -153,9 +153,9 @@ When forms don't involve file uploads and are using simpler fields, URL-encoded POST /submit HTTP/1.1 Host: example.com Content-Type: application/x-www-form-urlencoded -Content-Length: 15 +Content-Length: 16 -comment=Hello! +comment=Hello%21 ``` ### `Content-Type` in a REST API using JSON diff --git a/files/en-us/web/http/reference/status/205/index.md b/files/en-us/web/http/reference/status/205/index.md index 9408974419957c2..e07fc2efed2ef54 100644 --- a/files/en-us/web/http/reference/status/205/index.md +++ b/files/en-us/web/http/reference/status/205/index.md @@ -15,7 +15,8 @@ The instruction to "reset content" can mean clearing the contents of a form, res > In web applications that use the `205` status, it's assumed that the client handles resetting content after a `205` response. > This is typically done via JavaScript, as resetting content such as forms after a `205` response is not handled natively by browsers. -Note that the response must not include any content or the {{HTTPHeader("Content-Length")}} header (browsers may reject responses that include content). +Note that the response must not include any content, and browsers may reject responses that do so. +The response should not include the {{HTTPHeader("Content-Length")}} header either, but if it does the value must be `0`. The empty response may also be indicated using the {{HTTPHeader("Transfer-Encoding", "Transfer-Encoding: chunked")}} header with an empty chunk. ## Status @@ -34,9 +35,9 @@ The client in this example sends a `POST` request to submit a form with the comm POST /submit HTTP/1.1 Host: example.com Content-Type: application/x-www-form-urlencoded -Content-Length: 15 +Content-Length: 16 -comment=Hello! +comment=Hello%21 ``` After successfully processing the form submission, the server responds with the following `205` response, indicating that the client should reset the form. @@ -44,7 +45,6 @@ After successfully processing the form submission, the server responds with the ```http HTTP/1.1 205 Reset Content Content-Type: text/html; charset=utf-8 -Content-Length: 0 Date: Wed, 26 Jun 2024 12:00:00 GMT ``` diff --git a/files/en-us/web/progressive_web_apps/manifest/reference/serviceworker/index.md b/files/en-us/web/progressive_web_apps/manifest/reference/serviceworker/index.md index b2160f7ed74b900..ac51a44054685bb 100644 --- a/files/en-us/web/progressive_web_apps/manifest/reference/serviceworker/index.md +++ b/files/en-us/web/progressive_web_apps/manifest/reference/serviceworker/index.md @@ -11,7 +11,7 @@ sidebar: pwasidebar {{SeeCompatTable}}{{Non-standard_header}} -The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} for more details. +The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See {{domxref("Web-based Payment Handler API", "", "", "nocode")}} for more details. ## Values @@ -31,7 +31,7 @@ The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)- ## Examples -See [Payment Handler API > Concepts and usage](/en-US/docs/Web/API/Payment_Handler_API#concepts_and_usage). +See [Web-based Payment Handler API > Concepts and usage](/en-US/docs/Web/API/Web-Based_Payment_Handler_API#concepts_and_usage). ## Specifications @@ -44,7 +44,7 @@ See [Payment Handler API > Concepts and usage](/en-US/docs/Web/API/Payment_Handl ## See also - {{domxref("Service Worker API", "Service Worker API", "", "nocode")}} -- {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview) - [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method) - [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction) diff --git a/files/en-us/web/security/defenses/secure_contexts/features_restricted_to_secure_contexts/index.md b/files/en-us/web/security/defenses/secure_contexts/features_restricted_to_secure_contexts/index.md index 7c64dbf4651edbc..eb219857f3aeee3 100644 --- a/files/en-us/web/security/defenses/secure_contexts/features_restricted_to_secure_contexts/index.md +++ b/files/en-us/web/security/defenses/secure_contexts/features_restricted_to_secure_contexts/index.md @@ -37,7 +37,7 @@ This section lists APIs that specifications make available only in secure contex - {{domxref("Keyboard API", "", "", "nocode")}} - {{domxref("Local Font Access API", "", "", "nocode")}} - [Notifications API](/en-US/docs/Web/API/Notifications_API) -- {{domxref("Payment Handler API", "", "", "nocode")}} +- {{domxref("Web-based Payment Handler API", "", "", "nocode")}} - [Payment Request API](/en-US/docs/Web/API/Payment_Request_API) - [Presentation API](/en-US/docs/Web/API/Presentation_API) - [Push API](/en-US/docs/Web/API/Push_API) diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 0da42033f156738..b88703452126081 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -1182,20 +1182,6 @@ "properties": ["Document.hidden", "Document.visibilityState"], "events": ["Document: visibilitychange"] }, - "Payment Handler API": { - "overview": ["Payment Handler API"], - "interfaces": [ - "CanMakePaymentEvent", - "PaymentManager", - "PaymentRequestEvent" - ], - "methods": [], - "properties": ["ServiceWorkerRegistration.paymentManager"], - "events": [ - "ServiceWorkerGlobalScope: canmakepayment", - "ServiceWorkerGlobalScope: paymentrequest" - ] - }, "Payment Request API": { "overview": ["Payment Request API"], "guides": [ @@ -2045,6 +2031,20 @@ "properties": [], "events": [] }, + "Web-Based Payment Handler API": { + "overview": ["Web-based Payment Handler API"], + "interfaces": [ + "CanMakePaymentEvent", + "PaymentManager", + "PaymentRequestEvent" + ], + "methods": [], + "properties": ["ServiceWorkerRegistration.paymentManager"], + "events": [ + "ServiceWorkerGlobalScope: canmakepayment", + "ServiceWorkerGlobalScope: paymentrequest" + ] + }, "Web Components": { "overview": ["Web components"], "guides": [ diff --git a/files/jsondata/SpecData.json b/files/jsondata/SpecData.json index eb3c9a120edfd11..aef54f61f3ca539 100644 --- a/files/jsondata/SpecData.json +++ b/files/jsondata/SpecData.json @@ -1254,11 +1254,6 @@ "url": "https://w3c.github.io/payment-request/", "status": "CR" }, - "Payment Handler": { - "name": "Payment Handler API", - "url": "https://w3c.github.io/web-based-payment-handler/", - "status": "WD" - }, "Payment Method Identifiers": { "name": "Payment Method Identifiers", "url": "https://w3c.github.io/payment-method-id/", @@ -1859,6 +1854,11 @@ "url": "https://w3c.github.io/webauthn/", "status": "REC" }, + "Web-based Payment Handler": { + "name": "Web-based Payment Handler API", + "url": "https://w3c.github.io/web-based-payment-handler/", + "status": "WD" + }, "WebDriver": { "name": "WebDriver", "url": "https://w3c.github.io/webdriver/",