Skip to content
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

Correct data for Storage Access API #20094

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Conversation

queengooborg
Copy link
Collaborator

@queengooborg queengooborg commented Jun 12, 2023

This PR corrects the data for the Storage Access API for Chrome. This feature is reserved to Chrome's proprietary first-party sets and is not available to all websites, so it is marked as partial implementation.

Additionally, this removes the version_removed set on the flags. Not only were they incorrect (they were off by one), but the flag still enables the feature for websites not within first-party sets. (Although keeping the flag is technically against our irrelevant flag data policy, I feel that it is still worthwhile to retain as I personally don't consider gated access like first-party sets or origin trials to be "supported".)

@queengooborg queengooborg added the project: 2020+ data https://github.com/openwebdocs/project/issues/85 label Jun 12, 2023
@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jun 12, 2023
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but like to hear what @chrisdavidmills thinks

@chrisdavidmills
Copy link
Collaborator

LGTM but like to hear what @chrisdavidmills thinks

See #20098 (comment)

@queengooborg
Copy link
Collaborator Author

From #20098 (comment):

is it correct to say "Only available to Google Chrome's first-party sets" for hasStorageAccess and the storage-access permission? When I tested them, they were available just fine outside a first-party set. I think it is just requestStorageAccess() that is only available in first-party sets.

The storage-access permission may be "available" regardless of first-party set status, I didn't actually test that! hasStorageAccess, on the other hand, is not available on websites that aren't a first-party set, as confirmed in both manual testing and by the collector.

@chrisdavidmills
Copy link
Collaborator

The storage-access permission may be "available" regardless of first-party set status, I didn't actually test that! hasStorageAccess, on the other hand, is not available on websites that aren't a first-party set, as confirmed in both manual testing and by the collector.

I just tried running the following in the console while on MDN:

document.hasStorageAccess().then((result) => { console.log(result) })

And it returned true. It looks to me like it is still available, even if the result isn't particularly that useful.

@queengooborg
Copy link
Collaborator Author

Hmm... Is MDN defined as a first-party set, or is it possible that there's another requirement that MDN has configured? In a guest user on Chrome 114 with all of the default flags on about:blank, hasStorageAccess is not defined:

Screenshot 2023-06-12 at 06 44 34

@chrisdavidmills
Copy link
Collaborator

@queengooborg ahhhh, wait, I think I'm being stupid! I'm using Chrome Canary, which means that it is probably enabled fully by default rather than partially. Continue as you were ;-)

@queengooborg
Copy link
Collaborator Author

Ah, that would do it, haha!

How does this PR look then? Any changes needed?

Copy link
Collaborator

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light of that realization. I'm approving. Nice one @queengooborg

@queengooborg queengooborg merged commit 7bebc9b into mdn:main Jun 12, 2023
@queengooborg queengooborg deleted the storage-access branch June 12, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API project: 2020+ data https://github.com/openwebdocs/project/issues/85
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants