diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 5deed68ef..4ffd77d95 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3315,9 +3315,6 @@ } } }, - "ContactAddress": { - "name": "PaymentAddress" - }, "HTMLMediaElement": { "properties": { "property": { @@ -3364,27 +3361,6 @@ "exposed": "Window" }, - // Payment Request added shippingAddress with a different type - // https://github.com/w3c/payment-request/pull/996 - "PaymentRequest": { - "properties": { - "property": { - "shippingAddress": { - "type": "PaymentAddress" - } - } - } - }, - "PaymentResponse": { - "properties": { - "property": { - "shippingAddress": { - "type": "PaymentAddress" - } - } - } - }, - "SourceBuffer": { "exposed": "Window" }, diff --git a/inputfiles/patches/payment-request.kdl b/inputfiles/patches/payment-request.kdl new file mode 100644 index 000000000..bfef73927 --- /dev/null +++ b/inputfiles/patches/payment-request.kdl @@ -0,0 +1,11 @@ +// Payment Request added shippingAddress with a different type +// https://github.com/w3c/payment-request/pull/996 + +interface ContactAddress name=PaymentAddress + +interface PaymentRequest { + property shippingAddress type=PaymentAddress +} +interface PaymentResponse { + property shippingAddress type=PaymentAddress +} diff --git a/src/build/patches.ts b/src/build/patches.ts index c9b2683dc..39edb827d 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -143,7 +143,7 @@ function handleMixinandInterfaces( node: Node, type: "mixin" | "interface", ): DeepPartial { - const name = node.values[0]; + const name = string(node.properties?.name || node.values[0]); const event: Event[] = []; const property: Record> = {};