-
Notifications
You must be signed in to change notification settings - Fork 57
API exposure/behavior for unique origins? #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(nit: they are opaque origins, not unique origins; for example a sandboxed iframe can still possibly create workers that (should) share the same opaque origin with the window) |
Yeah sounds good. Are you writing tests by any chance? @shuangMoz do you know if we have tests for this? |
Yeah, I'll put up a PR for tests (it'll be a few days). |
Tests over at web-platform-tests/wpt#4919 |
Conversation over on the test PR have leaned towards (1) rejecting with (2) TypeError. |
Also consistently queue a task to reject and resolve promises from in parallel steps. Tests: web-platform-tests/wpt#4919. Fixes #41.
Also consistently queue a task to reject and resolve promises from in parallel steps. Tests: web-platform-tests/wpt#4919. Fixes #41.
Entry points (persist(), persisted(), estimate()) should reject in opaque origins (e.g., sandboxed iframes). See whatwg/storage#41.
Sandboxed iframes end up with unique opaque origins. We should define the behavior of the API here.
One option would be to simply reject on any API call (
persist()
,estimate()
, etc). Chrome currently does this, and it's per spec for other storage APIs (localStorage, etc). Indexed DB does this too in Chrome (not sure that's specified anywhere)Another would be to introduce an analogue to
[SecureContext]
that removes the API in unique opaque origins.Or we could let unique opaque origins have some ephemeral storage, with lifetime bound to the browsing context or some such. (But please no...)
The text was updated successfully, but these errors were encountered: