If that's an actual way to access it, "undefined" will have to be acceptable due to browsers that don't support it.
And undefined would still have to be handled anyway, as browsers without support wouldn't have the attribute at all (at least for several years after it was accepted, for everything to get the new feature).
The explainer indicates it's a Promise: "cohort = await document.interestCohort()" -- https://github.com/WICG/floc
One reason to make it async could be to give browsers the option to gate access behind a permissions prompt in some circumstances.
> And undefined would still have to be handled anyway, as browsers without support wouldn't have the attribute at all
Definitely. There are also browsers that are unlikely to add support (ex: Brave, as we're discussing)
Why? I would expect a browser extension to be able to override document.interestCohort to throw an exception?
(Disclosure: I work at Google, speaking only for myself)