Re: [w3c/payment-request] WIP: add paymentmethodchanged event (#695)

domenic requested changes on this pull request.

Some issues, in particular confusion about which payment handler is being referenced.

> +          Payment method changed algorithm
+        </h2>
+        <p>
+          The <dfn>payment method changed algorithm</dfn> runs when the user
+          selects a new payment method. It MUST run the following steps:
+        </p>
+        <ol class="algorithm">
+          <li>Let <var>request</var> be the <a>PaymentRequest</a> object that
+          the user is interacting with.
+          </li>
+          <li>Let <var>name</var> be "<a>paymentmethodchanged</a>".
+          </li>
+          <li>Let <var>methodDetails</var> be null.
+          </li>
+          <li>If <var>request</var>'s <a>payment handler</a> defines a <a>user
+          changes payment method</a> algorithm, set <var>methodDetails</var> be

This link is not going anywhere in the output. It should probably be a `<dfn>`?

> +          The <dfn>payment method changed algorithm</dfn> runs when the user
+          selects a new payment method. It MUST run the following steps:
+        </p>
+        <ol class="algorithm">
+          <li>Let <var>request</var> be the <a>PaymentRequest</a> object that
+          the user is interacting with.
+          </li>
+          <li>Let <var>name</var> be "<a>paymentmethodchanged</a>".
+          </li>
+          <li>Let <var>methodDetails</var> be null.
+          </li>
+          <li>If <var>request</var>'s <a>payment handler</a> defines a <a>user
+          changes payment method</a> algorithm, set <var>methodDetails</var> be
+          a <a data-cite="!WEBIDL#idl-dictionary">dictionary</a> or
+          <a data-cite="!WEBIDL#idl-object">object</a> resulting the user
+          selecting a different <a>payment method</a>.

Shouldn't this be "resulting from running that algorithm"?

> +        <ol class="algorithm">
+          <li>Let <var>request</var> be the <a>PaymentRequest</a> object that
+          the user is interacting with.
+          </li>
+          <li>Let <var>name</var> be "<a>paymentmethodchanged</a>".
+          </li>
+          <li>Let <var>methodDetails</var> be null.
+          </li>
+          <li>If <var>request</var>'s <a>payment handler</a> defines a <a>user
+          changes payment method</a> algorithm, set <var>methodDetails</var> be
+          a <a data-cite="!WEBIDL#idl-dictionary">dictionary</a> or
+          <a data-cite="!WEBIDL#idl-object">object</a> resulting the user
+          selecting a different <a>payment method</a>.
+          </li>
+          <li>Let <var>methodName</var> be the <a>payment method identifier</a>
+          of the <a>payment handler</a> the user is interacting with.

Is "the payment handler the user is interacting with" different from "request's payment handler"?

> +        <ol class="algorithm">
+          <li>Let <var>request</var> be the <a>PaymentRequest</a> object that
+          the user is interacting with.
+          </li>
+          <li>Let <var>name</var> be "<a>paymentmethodchanged</a>".
+          </li>
+          <li>Let <var>methodDetails</var> be null.
+          </li>
+          <li>If <var>request</var>'s <a>payment handler</a> defines a <a>user
+          changes payment method</a> algorithm, set <var>methodDetails</var> be
+          a <a data-cite="!WEBIDL#idl-dictionary">dictionary</a> or
+          <a data-cite="!WEBIDL#idl-object">object</a> resulting the user
+          selecting a different <a>payment method</a>.
+          </li>
+          <li>Let <var>methodName</var> be the <a>payment method identifier</a>
+          of the <a>payment handler</a> the user is interacting with.

Actually, given that the user is potentially switching payment handlers, is the original or the new one "request's payment handler"? Is the original or the new one "the payment handler the user is interacting with"?

-- 
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-request/pull/695#pullrequestreview-116361196

Received on Monday, 30 April 2018 17:10:53 UTC