Updating the function argument and return value type conversion behavior

Skip to first unread message

Maks Orlovich

Aug 25, 2023, 2:51:34 PM8/25/23
to FLEDGE API announcements

To better align Protected Audience with standard web practices, the type conversion behavior of values returned from worklets and arguments of API calls accessible in worklets will be updated to match the WebIDL specifications. With the change, the types of function arguments and return values will be attempted to be converted to the desired types automatically. For example, setting the bid field of generateBid()’s return to ”123” will have the same effect as setting it to 123, unlike the previous behavior where an error was thrown. In addition, the exception and error messages on some type errors may also be changed.

The same change is being applied to the Private Aggregation API where values will be attempted to be converted to BigInt. Therefore, values set for auctionReportBuyerKeys and auctionReportBuyers in the auction config will be converted to BigInt

The type conversion behavior will be updated in M117 and M118. If you have questions about this change, or are negatively affected, open an issue in the Privacy Sandbox Developer Support GitHub repository

Reply all
Reply to author
0 new messages