After that the browser should automatically throttle and provide an API to let the web app ask for permission to use more CPU, similar to how geolocation works today.
I don't see why this should be too complicated from the user's point of view. We're not talking about hard limits or real time guarantees. Browsers have a lot of wiggle room on the implementation side.
Also, how does one control what set of pages a given permission applies to? Exact URL often will be too limited, entire domain too coarse.
Allowing a page to use lots of CPU after every user interaction may be a way out, but if you do that, you don't need the explicit permission system.
[I also think the way browsers handle those geolocation permissions already is too complex for many users. They will simply learn "click 'allow', and things will work; click 'forbid' and things may break"]
It's not hugely important. It could be DOMContentLoaded + x seconds. It could be onload unless it doesn't fire within a reasonable amount of time. As long as the browser starts throttling within seconds I don't care much about the details. Login is not a concept I find relevant in this context.
>Also, how does one control what set of pages a given permission applies to?
It should apply on a per-domain basis. That may be too coarse in some cases but nothing is perfect. Let's go for good enough.
I think it would be better to give each tab a power budget that, initially, allows it to run for S seconds at full power, and that give it new budget at a rate of x < 100% of max power every second.
However, I fear that still won't be enough. The list of heuristics and exceptions could get so long that the resulting benaviour becomes difficult to explain.