Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set event interface for Payment Request update events #1315

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/events/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ before(async () => {
eventInterfaces.filter(iface => !usedEventInterfaces.has(iface)),
[
'SnapEvent', // pending https://github.com/w3c/csswg-drafts/issues/7442
'CustomEvent', // not used by any spec
'PaymentRequestUpdateEvent' // pending https://github.com/w3c/payment-request/issues/991
'CustomEvent' // not used by any spec
],
"Event interfaces are defined in the platform but not referenced from extracted events"
);
Expand Down
12 changes: 12 additions & 0 deletions tools/amend-event-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,18 @@ const patches = {
change: { interface: 'DeviceOrientationEvent' }
}
],
'payment-request-1.1': [
// Spec uses an indirect algo to fire events:
// https://www.w3.org/TR/payment-request/#dfn-paymentrequest-updated-algorithm
// That said, extraction could perhaps process the informative events
// summary table to extract the interface name at some point:
// https://www.w3.org/TR/payment-request/#summary
{
pattern: { type: /^(shipping|payer).*change$/ },
matched: 3,
change: { interface: "PaymentRequestUpdateEvent" }
}
],
// TODO: to-be-idenfied bug in reffy, see https://github.com/w3c/webref/commit/348b90a37475563d924f4da8156c290ca27d77e2#diff-3877beb696dd5561959ba0c9b8c1485e9c78fbed53b1ec6723ae68621940e0c7
'periodic-background-sync': [
{
Expand Down