Confirmed users
1,158
edits
Line 62: | Line 62: | ||
== Use Cases == | == Use Cases == | ||
=== Accessing file:// | === Accessing file:// in tabs and content scripts === | ||
This enables add-ons to read files from the filesystem. Mostly for things like configurations files (uBlock Origin) or data files (ePub Reader). | This enables add-ons to read files from the filesystem. Mostly for things like configurations files (uBlock Origin) or data files (ePub Reader). | ||
Line 69: | Line 69: | ||
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. | 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. | ||
=== iframing file urls === | |||
In Chrome the "Allow file system access" allows you to iframe a file:/// URL on an extension page. | |||
=== The downloads API === | === The downloads API === |