Persistent File System Access and Offscreen Documents

75 views
Skip to first unread message

Ian Williams

unread,
May 5, 2023, 7:12:24 PM5/5/23
to Chromium Extensions
With work being done to allow websites to have persistent file access (with the right permissions!), will Offscreen Documents be able to use filehandle.getFile() in the future? 

Presumably, if someone gave persistent access, it's expected to work across all contexts.

Patrick Kettner

unread,
May 8, 2023, 9:42:10 AM5/8/23
to Ian Williams, Chromium Extensions
I am not aware of any work being done on this, since it relies on a widget to create the filehandle in the first place, and user facing UI like the file picker are not shown in offscreenDocuments. I would expect you would load a file from a context script, popup, or sidepanel. Is there a reason you would want to load a file inside of an offscreenDocument?

patrick

On Fri, May 5, 2023 at 7:12 PM Ian Williams <iwillcr...@gmail.com> wrote:
With work being done to allow websites to have persistent file access (with the right permissions!), will Offscreen Documents be able to use filehandle.getFile() in the future? 

Presumably, if someone gave persistent access, it's expected to work across all contexts.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/3837b5db-c989-43e7-b08b-8671d3da96d2n%40chromium.org.

Ian Williams

unread,
May 8, 2023, 9:56:14 AM5/8/23
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Ian Williams
Yes, it would be after the directory is picked. 
Essentially, having a background watcher on a file/folder that the user wants to have that access indefinitely. 

As an example, a background music player. They've gone through my UI and selected the music folder, and expect that all files in and changes to that folder will be detected (as would be the case in most desktop apps). As is, we'd need to keep an on-screen window open despite offscreen windows supporting audio playback. 

Patrick Kettner

unread,
May 8, 2023, 11:03:01 AM5/8/23
to Ian Williams, Chromium Extensions
Thank you for the clarification! I am not aware of anyone on the team looking into that, so opening a feature request on crbug.com/new would be the best option. To improve its performance during triage, make sure to include your specific use case, and why an offscreenDocument is the ideal format for it.

patrick

Ian Williams

unread,
May 8, 2023, 11:05:48 AM5/8/23
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Ian Williams
Thanks, will do! 
Reply all
Reply to author
Forward
0 new messages