HTML and CSS Reference
In-Depth Information
their changes, preview the file, and return to the File Editor view. It will also warn the user
if they try to navigate away from the File Editor view when they have unsaved changes.
Before you begin: important browser notes
The File System API (also known as the File Directories and System API) is a relatively
late addition to the HTML5 specification and thus hasn't yet been implemented by most
browser vendors. Although most have provided partial support for the accompanying File
API, which you can use to read the contents of local files that the user selects or drops into
the application, only Google Chrome currently supports the File System and File Writer
APIs that are used to actually create and store files on the client side. The sample applica-
tion has been written to include vendor prefixes that will probably be used when the other
browsers start to include support for these features, but we can't guarantee that their actual
implementation will follow this path.
Also, if you're using Chrome and plan to test this application in your local directory instead
of on a server, you'll need to start Chrome with the following option:
If you don't, your application's client-side filesystem will be inaccessible and the Geoloca-
tion API won't be able to access your location.
In this section, you'll build the HTML document for the application and implement basic
navigation and state management functionality using JavaScript. The work happens in five
• Step 1: Create index.html.
• Step 2: Add markup for the File Browser view.
• Step 3: Add markup for the File Editor view.
• Step 4: Initialize the application.
• Step 5: Enable navigation between views and manage the state of documents being
Search WWH ::

Custom Search