This is also possible using the FileWriter API (currently only supported by Chrome: http://caniuse.com/filesystem).
Oddly enough, Google Chrome prompts you to grant file system access, but doesn't explicitly tell you how much space is being asked for.