Re: [w3c/payment-handler] [WIP] showPaymentUI() method (#325)

rsolomakhin commented on this pull request.



> @@ -1643,6 +1654,44 @@ <h2>
         <a>PaymentRequest</a>. A single <a>payment handler</a> SHOULD NOT be
         allowed to open more than one client window using this method.
       </p>
+      <section data-dfn-for="PaymentHandlerContainer" data-link-for=
+      "PaymentHandlerContainer">
+        <h2>
+          <dfn>PaymentHandlerContainer</dfn> interface
+        </h2>
+        <pre class="idl">
+        [SecureContxt, Exposed=Window]
+        interface PaymentHandlerContainer {
+          readonly attribute object? data;
+          void respondWith(PaymentHandlerResponse response);
+        };
+
+        partial interface Navigator {
+          [SecureContext, SameObject] readonly attribute PaymentHandlerContainer paymentHandler;

If both `navigator.paymentHandler` and `navigator.paymentHandler.data` are not promises, then the browser has to initialize these objects very early in page load, which can affect page loading performance. Can we make at least one of these into a promise, so that the browser can lazy-instantiate them after the page has loaded?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-handler/pull/325#pullrequestreview-158171436

Received on Monday, 24 September 2018 15:52:14 UTC