Proposal
Implement a minimal StorageManager surface to expose storage usage and persistence semantics for headless and test scenarios.
Scope:
- Add navigator.storage getter.
- Implement estimate returning quota and usage.
- Implement persist and persisted with platform-injected behavior.
- Optional extension point for getDirectory compatibility.
Technical Notes:
- Use the same service registration pattern as Clipboard and Geolocation.
- Keep persistence decisions delegated to an injected platform interface.
Acceptance Criteria:
- navigator.storage is available when registered.
- estimate returns deterministic values in tests.
- persist and persisted map to the injected platform implementation.
- Full unit test coverage for success and edge cases.
Out of Scope:
- Real browser eviction heuristics.
- Full OPFS implementation in first pass.
Description
Add StorageManager on navigator.storage with a minimal but useful subset: estimate, persist, and persisted. The implementation should be platform-injected to support deterministic behavior in tests and host-specific behavior in production.
Background
This complements existing storage APIs by exposing quota/usage and persistence intent, which are common needs in headless automation and integration test environments. It also creates a bridge toward future OPFS support.
Specification
Proposal
Implement a minimal StorageManager surface to expose storage usage and persistence semantics for headless and test scenarios.
Scope:
Technical Notes:
Acceptance Criteria:
Out of Scope:
Description
Add StorageManager on navigator.storage with a minimal but useful subset: estimate, persist, and persisted. The implementation should be platform-injected to support deterministic behavior in tests and host-specific behavior in production.
Background
This complements existing storage APIs by exposing quota/usage and persistence intent, which are common needs in headless automation and integration test environments. It also creates a bridge toward future OPFS support.
Specification