From 12190eb85ae3b180a0bae04b3629ac05c2c090a6 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Wed, 21 May 2025 13:28:42 -0400 Subject: [PATCH] Define IDL methods using "method steps" approach --- api.bs | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/api.bs b/api.bs index 18819b7..d863805 100644 --- a/api.bs +++ b/api.bs @@ -551,7 +551,7 @@ used by different [=aggregation services=]. This document defines two protocols: ## Saving Impressions ## {#save-impression-api} -The saveImpression() method requests +The saveImpression() method requests that the [=user agent=] record an [=impression=] in the [=impression store=].
@@ -631,15 +631,9 @@ The arguments to saveImpression() are as fo -The saveImpression(|options|) method -causes the user agent to invoke the [=save an impression=] algorithm -with [=this=]'s [=relevant settings object=] -and the provided |options|. - - ## Requesting Attribution for a Conversion ## {#measure-conversion-api} -The measureConversion() method +The measureConversion() method requests that the [=user agent=] perform [=attribution=] for a [=conversion=], and return a [=conversion report=]. @@ -811,12 +805,6 @@ The arguments to measureConversion() are as -The measureConversion(|options|) method -causes the user agent to invoke the [=measure a conversion=] algorithm -with [=this=]'s [=relevant settings object=] -and the provided |options|. - - ## Permissions Policy Integration ## {#permission-policy} This specification defines two [=policy-controlled features=]: @@ -1219,12 +1207,11 @@ returning an [=epoch index=]: ## Save Impression Algorithm ## {#save-impression-api-operation} -To save an impression, -given an [=environment settings object=] |settings| -and given |options|: +The saveImpression(|options|) method steps are: +1. Let |settings| be [=this=]'s [=relevant settings object=]. 1. Collect the implicit API inputs from |settings|: 1. Let |timestamp| be |settings|' [=environment settings object/current wall time=]. 1. The [=impression site=] |site| is set to the result of @@ -1267,12 +1254,11 @@ API is [[#opt-out|disabled]]. ## Measure Conversion Algorithm ## {#measure-conversion-api-operation} -To measure a conversion, -given a [=environment settings object=] |settings| -and |options|: +The measureConversion(|options|) method steps are: +1. Let |settings| be [=this=]'s [=relevant settings object=]. 1. Collect the implicit API inputs from |settings|: 1. Let |now| be |settings|' [=environment settings object/current wall time=]. 1. Let |topLevelSite| (the [=conversion site=]) be the result of