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

Add FileSystemSyncAccessHandle data #18067

Merged

Conversation

chrisdavidmills
Copy link
Collaborator

Summary

This PR adds BCD for:

  • FileSystemFileHandle (already exists)
    • Add createSyncAccessHandle()
  • FileSystemSyncAccessHandle
    • read()
    • write()
    • truncate()
    • getSize()
    • flush()
    • close()

In the current spec, close(), flush(), getSize(), and truncate() are specified as asynchronous — they return promises. Chrome 108 has introduced new synchronous versions of these methods, behind a flag.

Specs:

Test results and supporting details

Tested in Safari and Chrome with these samples:

The Gecko source code contains WebIDL for these features, preffed off by default (see https://searchfox.org/mozilla-central/source/dom/webidl/FileSystemSyncAccessHandle.webidl). I enabled the pref and tried my demos in Firefox, but they didn't work (failed silently), and I'm not sure why. So I've just left Fx support as false for now.

Other supporting pages and evidence:

Related issues

Fixes #18065

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Oct 24, 2022
@queengooborg queengooborg merged commit 9cd2dc8 into mdn:main Oct 28, 2022
@saschanaz
Copy link
Contributor

saschanaz commented Oct 29, 2022

In the current spec, close(), flush(), getSize(), and truncate() are specified as asynchronous — they return promises. Chrome 108 has introduced new synchronous versions of these methods, behind a flag.

whatwg/fs#55 made them synchronous, I wonder 102 should be marked as partial support 🤔

@chrisdavidmills chrisdavidmills deleted the add-FileSystemSyncAccessHandle-data branch December 5, 2022 07:21
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileSystemSyncAccessHandle - Add the data
3 participants