diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index 53e194a5..cdbb674c 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -425,6 +425,13 @@

PaymentRequest constructor

length of 1, then set shippingOption to the id of the only ShippingOption in the sequence. +
  • + If details contains a shippingOptions sequence with a + length greater than 1, and if any ShippingOption in the sequence + has the selected field set to true, then set + shippingOption to the id of the last ShippingOption + in the sequence with selected set to true. +
  • Set the value request@[[\updating]] to false.
  • Return request.
  • @@ -682,9 +689,21 @@

    PaymentDetails dictionary

    If the sequence only contains one item, then this is the shipping option that will be used and shippingOption will be set to the id of this option without running the shipping option changed algorithm.

    +

    If an item in the sequence has the selected field set to true, + then this is the shipping option that will be used by default and shippingOption + will be set to the id of this option without running the shipping option changed + algorithm. Authors SHOULD NOT set selected to true on more than + one item. If more than one item in the sequence has selected set to true, + then user agents MUST select the last one in the sequence.

    The shippingOptions field is only used if the PaymentRequest was constructed with PaymentOptions requestShipping set to true.

    +

    + If the sequence contains only one item or if the sequence has an item with the selected + field set to true, then authors SHOULD ensure that the total field includes + the cost of the shipping option. This is because no shippingoptionchange event + will be fired for this option unless the user selects an alternative option first. +

    @@ -814,6 +833,7 @@

    ShippingOption interface

    required string id; required string label; required CurrencyAmount amount; + boolean selected = false; };

    @@ -835,6 +855,9 @@

    ShippingOption interface

    A CurrencyAmount containing the monetary amount for the item.
    +
    selected
    +
    This is set to true to indicate that this is the default selected ShippingOption + in a sequence. User agents SHOULD display this option by default in the user interface.
    @@ -1033,6 +1056,13 @@

    PaymentRequestUpdateEvent

    length of 1, then set newOption to the id of the only ShippingOption in the sequence. +
  • + If details contains a shippingOptions sequence with a + length greater than 1, and if any ShippingOption in the sequence + has the selected field set to true, then set + newOption to the id of the last ShippingOption + in the sequence with selected set to true. +
  • Set the value of shippingOption on target to newOption.