d2296fac85
Updates a nunber of dependencies in a single PR. These were suggested by dependabot but updating them individually would mean the reposistory would be in a broken state until everything had merged. I'm not personally a huge fan of lowercasing doctype, but Prettier has taken an opinionated stance here and there is not a way to disable it: https://github.com/prettier/prettier/issues/15096 |
||
---|---|---|
.. | ||
README.md | ||
manifest.json | ||
screenshot.png | ||
view-file.html | ||
view-file.js |
README.md
Cookbook - File Handling
This sample demonstrates file handling in an extension.
Overview
On ChromeOS only, extensions can use the file_handlers
manifest key to
register as a file handler for particular file types. This behaves in a similar way to the
equivalent key in web
applications. As with web applications, you use the Launch Handler API to open and process a file.
This extension lets you open text files and see their name and size on the opened extension page. This could be a good starting point for building an extension that displays or interacts with an opened file.
Running this extension
This API is only supported on ChromeOS.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Create a text file on your ChromeOS device.
- In the Files app, select the file.
- In the toolbar, choose "Open" and then "File Handling Demo".