You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"html": "The <a href=\"https://html.spec.whatwg.org/multipage/semantics.html#fetch-and-process-the-linked-resource\" id=\"23c7eb740\">fetch and process the linked resource</a> algorithm for <code><a data-link-type=\"attr-value\" href=\"https://wicg.github.io/paymentlink/#attr-valuedef-link-rel-facilitated-payment\" id=\"ref-for-attr-valuedef-link-rel-facilitated-payment④\">facilitated-payment</a></code> links, given a <code><a data-link-type=\"element\" href=\"https://html.spec.whatwg.org/multipage/semantics.html#the-link-element\" id=\"ref-for-the-link-element⑤\">link</a></code> element <var>el</var>, is as follows:",
9
+
"rationale": "if",
10
+
"steps": [
11
+
{
12
+
"html": "<p>If <var>el</var>’s <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object\" id=\"ref-for-relevant-settings-object\">relevant settings object</a> is not a <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#secure-context\" id=\"ref-for-secure-context\">secure context</a>, then return.</p>"
13
+
},
14
+
{
15
+
"html": "<p>If <var>el</var>’s <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/document-sequences.html#node-navigable\" id=\"ref-for-node-navigable\">node navigable</a> is not a <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-traversable\" id=\"ref-for-top-level-traversable\">top-level traversable</a>, then return.</p>"
16
+
},
17
+
{
18
+
"html": "<p>If <var>el</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-node-document\" id=\"ref-for-concept-node-document\">node document</a> is not <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use\" id=\"ref-for-allowed-to-use\">allowed to use</a> the <a class=\"idl-code\" data-link-type=\"permission\" href=\"https://w3c.github.io/payment-request/#dfn-payment\" id=\"ref-for-dfn-payment\">payment</a> feature, then return.</p>"
19
+
},
20
+
{
21
+
"html": "<p>If <var>el</var>’s <code><a data-link-type=\"element-sub\" href=\"https://html.spec.whatwg.org/multipage/semantics.html#attr-link-href\" id=\"ref-for-attr-link-href③\">href</a></code> attribute’s value is the empty string, then return.</p>"
22
+
},
23
+
{
24
+
"html": "<p>Let <var>url</var> be the result of <a data-link-type=\"dfn\" href=\"https://html.spec.whatwg.org/multipage/urls-and-fetching.html#encoding-parsing-a-url\" id=\"ref-for-encoding-parsing-a-url\">encoding-parsing a URL</a> given <var>el</var>’s <code><a data-link-type=\"element-sub\" href=\"https://html.spec.whatwg.org/multipage/semantics.html#attr-link-href\" id=\"ref-for-attr-link-href④\">href</a></code> attribute’s value, relative to <var>el</var>’s <a data-link-type=\"dfn\" href=\"https://dom.spec.whatwg.org/#concept-node-document\" id=\"ref-for-concept-node-document①\">node document</a>.</p>"
25
+
},
26
+
{
27
+
"html": "<p>If <var>url</var> is failure, then return.</p>"
28
+
},
29
+
{
30
+
"html": "<p>If <var>url</var>’s <a data-link-type=\"dfn\" href=\"https://url.spec.whatwg.org/#concept-url-scheme\" id=\"ref-for-concept-url-scheme②\">scheme</a> is not supported for facilitated payments by the user agent, then return.</p>"
31
+
},
32
+
{
33
+
"html": "<p>Find all payment wallets integrated with the user agent which are compatible with <var>url</var>’s <a data-link-type=\"dfn\" href=\"https://url.spec.whatwg.org/#concept-url-scheme\" id=\"ref-for-concept-url-scheme③\">scheme</a>. Let <var>compatibleWallets</var> be a <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#ordered-set\" id=\"ref-for-ordered-set\">set</a> containing all such wallets.</p>"
34
+
},
35
+
{
36
+
"html": "<p>If <var>compatibleWallets</var>’s <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-size\" id=\"ref-for-list-size\">size</a> is 0, then return.</p>"
37
+
},
38
+
{
39
+
"html": "<p>Prompt the user with a wallet selector containing <var>compatibleWallets</var> for users to choose the payment method they want to use.</p>"
40
+
},
41
+
{
42
+
"html": "<p>If the wallet selector is dismissed, then return.</p>"
43
+
},
44
+
{
45
+
"html": "<p>Hand off <var>url</var> to the selected wallet software. This wallet software must not immediately perform any payments, but instead should help the user perform the specified payment, using details specified in <var>url</var> such as the payment amount, payee, and currency. The details of how such wallet software is integrated with the user agent, and how the handoff is performed, are <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#implementation-defined\" id=\"ref-for-implementation-defined\">implementation-defined</a>.</p>"
"html": "<p>If the private attribution API is enabled, save the impression to the <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#impression-store\" id=\"ref-for-impression-store①\">impression store</a>.</p>"
31
+
}
32
+
]
33
+
},
34
+
{
35
+
"html": "The arguments to <a class=\"idl-code\" data-link-type=\"method\" href=\"https://w3c.github.io/ppa/#dom-privateattribution-measureconversion\" id=\"ref-for-dom-privateattribution-measureconversion⑧\">measureConversion()</a> are as follows:",
36
+
"rationale": "collect",
37
+
"steps": [
38
+
{
39
+
"html": "<p>Collect the implicit API inputs</p>",
40
+
"ignored": [
41
+
"The current timestamp The conversion site domain The iframe site domain"
42
+
]
43
+
},
44
+
{
45
+
"html": "Validate the page-supplied API inputs",
46
+
"rationale": "if",
47
+
"steps": [
48
+
{
49
+
"html": "<p>If <a class=\"idl-code\" data-link-type=\"dict-member\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-logic\" id=\"ref-for-dom-privateattributionconversionoptions-logic①\">logic</a> is specified, and the value is anything other than <a class=\"idl-code\" data-link-type=\"enum-value\" href=\"https://w3c.github.io/ppa/#dom-privateattributionlogic-last-touch\" id=\"ref-for-dom-privateattributionlogic-last-touch\">\"last-touch\"</a>,\nreturn an error.</p>"
50
+
}
51
+
]
52
+
},
53
+
{
54
+
"html": "<p>If the private attribution API is enabled,\ninvoke the routine to <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#do-attribution-and-fill-a-histogram\" id=\"ref-for-do-attribution-and-fill-a-histogram\">do attribution and fill a histogram</a>.</p>"
"html": "To <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-noexport=\"\" id=\"do-attribution-and-fill-a-histogram\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">do attribution and fill a histogram</dfn>, given <a class=\"idl-code\" data-link-type=\"dictionary\" href=\"https://w3c.github.io/ppa/#dictdef-privateattributionconversionoptions\" id=\"ref-for-dictdef-privateattributionconversionoptions②\"><var>options</var></a>:",
68
+
"rationale": "initialize",
69
+
"steps": [
70
+
{
71
+
"html": "<p>Initialize <var>matchedImpressions</var> to the empty <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#ordered-set\" id=\"ref-for-ordered-set\">set</a>.</p>"
72
+
},
73
+
{
74
+
"html": "<p>Let <var>now</var> be the current time.</p>"
75
+
},
76
+
{
77
+
"html": "For each <var>epoch</var> starting from the oldest epoch supported by the <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#user-agent\" id=\"ref-for-user-agent⑧\">user agent</a> to the current <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#privacy-budget-epoch\" id=\"ref-for-privacy-budget-epoch\">privacy budget epoch</a>:",
78
+
"rationale": "let",
79
+
"steps": [
80
+
{
81
+
"html": "<p>Let <var>impressions</var> be the result of invoking <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#common-matching-logic\" id=\"ref-for-common-matching-logic①\">common matching logic</a> with <var>options</var>, <var>epoch</var>, and <var>now</var>.</p>"
82
+
},
83
+
{
84
+
"html": "If <var>impressions</var> is not empty:",
85
+
"rationale": "let",
86
+
"steps": [
87
+
{
88
+
"html": "<p>Let <var>budgetOk</var> be the result of <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#deduct-privacy-budget\" id=\"ref-for-deduct-privacy-budget①\">deduct privacy budget</a> with <var>epoch</var> and <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-epsilon\" id=\"ref-for-dom-privateattributionconversionoptions-epsilon①\">epsilon</a></code>.</p>"
89
+
},
90
+
{
91
+
"html": "<p>If <var>budgetOk</var> is true, <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#set-extend\" id=\"ref-for-set-extend\">extend</a> <var>matchedImpressions</var> with <var>impressions</var>.</p>"
"html": "Switch on <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-logic\" id=\"ref-for-dom-privateattributionconversionoptions-logic③\">logic</a></code>:",
102
+
"rationale": ".switch",
103
+
"steps": [
104
+
{
105
+
"operation": "switch",
106
+
"steps": [
107
+
{
108
+
"case": "\"last-touch\"",
109
+
"html": "<p>Return the result of <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#fill-a-histogram-with-last-touch-attribution\" id=\"ref-for-fill-a-histogram-with-last-touch-attribution\">fill a histogram with last-touch attribution</a> with <var>matchedImpressions</var>, <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-histogramsize\" id=\"ref-for-dom-privateattributionconversionoptions-histogramsize②\">histogramSize</a></code>, and <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-value\" id=\"ref-for-dom-privateattributionconversionoptions-value①\">value</a></code>.</p>"
110
+
}
111
+
]
112
+
}
113
+
]
114
+
}
115
+
]
116
+
},
117
+
{
118
+
"name": "fill a histogram with last-touch attribution",
"html": "To <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-noexport=\"\" id=\"fill-a-histogram-with-last-touch-attribution\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">fill a histogram with last-touch attribution</dfn>, given a <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#ordered-set\" id=\"ref-for-ordered-set①\">set</a> of <a data-link-type=\"dfn\" href=\"https://w3c.github.io/ppa/#impression\" id=\"ref-for-impression②⓪\">impressions</a> <var>matchedImpressions</var>, a <var>histogramSize</var>, and a <var>value</var>:",
"html": "<p>Set <var>impression</var> to the value in <var>matchedImpressions</var> with the most recent <var>impression</var>.timestamp.</p>"
128
+
},
129
+
{
130
+
"html": "<p>If <var>histogramSize</var> is less than or equal to <var>impression</var>.<var>histogramIndex</var>,\nreturn the all-zero histogram containing <var>histogramSize</var> values.</p>"
131
+
},
132
+
{
133
+
"html": "<p>Return a histogram containing <var>histogramSize</var> values, with a value of <var>value</var> at an index of <var>impression</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionimpressionoptions-histogramindex\" id=\"ref-for-dom-privateattributionimpressionoptions-histogramindex①\">histogramIndex</a></code>,\nand a value of zero at all other indices.</p>"
"html": "<p>If number of days since the end of <var>epoch</var> exceeds <var>lookbackDays</var>,\nreturn an empty set.</p>"
145
+
},
146
+
{
147
+
"html": "<p>Initialize <var>matching</var> to an empty set.</p>"
148
+
},
149
+
{
150
+
"html": "For each <var>impression</var> in the saved impressions for the <var>epoch</var>:",
151
+
"rationale": "if",
152
+
"steps": [
153
+
{
154
+
"html": "<p>If <var>now</var> - <var>lookbackDays</var> is after <var>impression</var>.timestamp,\ncontinue the loop.</p>"
155
+
},
156
+
{
157
+
"html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-filterdata\" id=\"ref-for-dom-privateattributionconversionoptions-filterdata②\">filterData</a></code> does not match <var>impression</var>.filterData,\ncontinue the loop.</p>"
158
+
},
159
+
{
160
+
"html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://w3c.github.io/ppa/#dom-privateattributionconversionoptions-impressionsites\" id=\"ref-for-dom-privateattributionconversionoptions-impressionsites①\">impressionSites</a></code> does not contain <var>impression</var>.impressionSite,\ncontinue the loop.</p>"
161
+
},
162
+
{
163
+
"html": "<p>Add <var>impression</var> to <var>matching</var>.</p>"
0 commit comments