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
The Uint8Array from the resolved promise is the encrypted report. However, it may be beneficial to future-proof the return type here by introducing a wrapper dictionary. For example, if some unencrypted structured metadata were produced by measureConversion, it would be easier to introduce it backwards-compatibly if the definition were instead something like:
// exact naming of type and field TBD
dictionary MeasureConversionResult {
required Uint8Array report;
};
[SecureContext, Exposed=Window]
partial interfacePrivateAttribution {
[Throws] Promise<MeasureConversionResult> measureConversion(PrivateAttributionConversionOptions options);
};
This sort of wrapper could also be useful if the API gains additional methods that operate on MeasureConversionResults in their entirety.
The text was updated successfully, but these errors were encountered:
Jumping straight to the attractive nuisance... I would say "ConversionResult" would be fine. Still, it's a contested namespace, so maybe we need a prefix. It's not like the name needs to be used, so maybe "PrivateAttributionConversionResult" is fine.
As far as the shape thing goes, I'm supportive of the change. It's a bit more work to do, but I can see how it might be useful to communicate metadata alongside the report. For instance, it might be sensible for us to include the complete set of options that were used in the creation of the report, particularly when they aren't just a direct copy from the provided options (for instance, if there are UA-specific defaults, rather than defaults that we can fix in the spec).
Today
measureConversion
is defined as follows:The
Uint8Array
from the resolved promise is the encrypted report. However, it may be beneficial to future-proof the return type here by introducing a wrapper dictionary. For example, if some unencrypted structured metadata were produced bymeasureConversion
, it would be easier to introduce it backwards-compatibly if the definition were instead something like:This sort of wrapper could also be useful if the API gains additional methods that operate on
MeasureConversionResult
s in their entirety.The text was updated successfully, but these errors were encountered: