KEMBAR78
Should PaymentMethodData be converted at construction time? · Issue #813 · w3c/payment-request · GitHub
Skip to content

Should PaymentMethodData be converted at construction time? #813

@marcoscaceres

Description

@marcoscaceres

Related to #753

Given the following:

var details = {
  total: {
    label: "Total",
    amount: {
      currency: "USD",
      value: "0.00",
    },
  },
};
new PaymentRequest(
  [
    { supportedMethods: "basic-card", data: { supportedNetworks: "☠️" } },
  ],
  details
);

Firefox currently throws, because it tries to do the IDL conversion:

TypeError: Fail to convert methodData.data to BasicCardRequest.

Chrome doesn't throw.

Per spec, Chrome is right... but it not doing the conversion seems not great.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions