Something similar to https://w3c.github.io/web-locks/#web-locks-tasks-source The task source should allow pending beacon to work when page frozen.