I was thinking that internally, we'd maintain such a data structure. Obviously an iframe shouldn't be able to stomp its parent's disable-screensaver request. The question is whether we need an API like that within a document.
I can imagine two components (one of which is third-party, so you can't change it) in a document both trying to manage the screen's lock/unlock state, but is that really a common case we should design around?
(People made the same argument with history.pushState -- we should do something which allows two independent pieces of code to call pushState without stomping on each other -- but I haven't heard about the simpler design we chose being a problem in practice.)
I was thinking that internally, we'd maintain such a data structure. Obviously an iframe shouldn't be able to stomp its parent's disable-screensaver request. The question is whether we need an API like that within a document.
I can imagine two components (one of which is third-party, so you can't change it) in a document both trying to manage the screen's lock/unlock state, but is that really a common case we should design around?
(People made the same argument with history.pushState -- we should do something which allows two independent pieces of code to call pushState without stomping on each other -- but I haven't heard about the simpler design we chose being a problem in practice.)