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

Clearly require use of 'permission state' to be 'in parallel' #453

Open
jyasskin opened this issue Sep 10, 2024 · 1 comment
Open

Clearly require use of 'permission state' to be 'in parallel' #453

jyasskin opened this issue Sep 10, 2024 · 1 comment

Comments

@jyasskin
Copy link
Member

@reillyeon reports in WICG/idle-detection#55 (comment) that browsers retrieve the permission state asynchronously, so use of permission state in specs needs to be 'in parallel'. But https://w3c.github.io/permissions/#dfn-permission-state doesn't have any indication of this fact, so it's easy to write specifications that incorrectly promise to return results an event-loop-turn early.

Ideally this indication would integrate with Strudy's parallel algorithm checking. cc/ @tidoust

@tidoust
Copy link
Member

tidoust commented Sep 11, 2024

If the algorithm needs to run "in parallel", it would be useful to add a first "Assert: this is running in parallel." step, as done in a few algorithms, e.g., attempt to populate the history entry's document in HTML.

The statement has no implications for implementations, but would make it clear to spec authors who need to call the algorithm that it needs to be called within "in parallel" steps. It would also make it possible to detect hiccups automatically afterwards (Strudy does not follow algorithms just yet, but hopefully will in some not too distant future!).

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

No branches or pull requests

2 participants