OpenPWA Demo

File handling

The manifest declares this page as the handler for .txt and .md files. When the installed app is opened from such a file, window.launchQueue delivers it here. The run button opens the same kind of file through showOpenFilePicker (or a plain file input where the picker is unavailable). Only the file name and size are read; the contents are never touched.

Preconditions

The code being run

Rendered from each function's own source with toString(); the page and the button call exactly this.

Receive files from the operating system (runs on load)

Open a file with the picker (runs on the button)

Run

Reference