Clearly require use of 'permission state' to be 'in parallel'
Opened this issue · 1 comments
@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
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!).