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

Fix erroneous usage of some method in example code #112

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

apasel422
Copy link
Collaborator

@apasel422 apasel422 commented Mar 3, 2025

The PrivateAttributionAggregationServices interface is setlike, so in order to call some we must first call values.


Preview | Diff

@apasel422
Copy link
Collaborator Author

It's not clear to me how useful setlike is here, given that the values are dictionaries. Separately, we may want to consider changing this to maplike instead, with the keys being url.

@apasel422 apasel422 marked this pull request as ready for review March 3, 2025 17:16
@apasel422 apasel422 requested a review from martinthomson March 3, 2025 17:16
@martinthomson
Copy link
Member

Would maplike be easier to use, or harder? That is, what difference is there in this example code?

@martinthomson martinthomson merged commit a089eb4 into w3c:main Mar 5, 2025
1 check passed
@apasel422 apasel422 deleted the example branch March 5, 2025 13:21
@apasel422
Copy link
Collaborator Author

Would maplike be easier to use, or harder? That is, what difference is there in this example code?

To me there's little benefit to this interface being setlike, since the element type is a dictionary, rather than something that can be compared for equality beyond object identity. If it was a maplike, we could have it keyed on the service URL, which would make this example able to do a lookup without calling some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants