WebExtensions/Filesystem: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 61: Line 61:


== Use Cases ==
== Use Cases ==
=== Accessing file:// URLs ===
This enables add-ons to read files from the filesystem. Mostly for things like configurations files (uBlock Origin) or data files (ePub Reader).
Chrome: can call file URLs in tabs APIs, e.g.: tabs.create or tabs.update. However it can't then attach content scripts to those tabs so you can't get the content of the file unless you check "Allow file system access". This allows you to open a file:// URL and then through the content script read the contents.
Firefox: cannot call file URLs in tabs APIs, e.g.: tabs.create or tabs.update. Can attach a content script to those tabs. This means that you can't open a file:// URL and then read through the contents, unless you can get the user to open the file:// for you.


=== The downloads API ===
=== The downloads API ===
Confirmed users
1,158

edits

Navigation menu