In addition to specifying markup, HTML5 specifies scripting application programming interfaces (APIs) that can be used with JavaScript.[36] Existing document object model (DOM) interfaces are extended and de facto features documented. There are also new APIs, such as:
- The canvas element for immediate mode 2D drawing. See Canvas 2D API Specification 1.0 specification[38]
- Timed media playback
- Offline Web Applications[39]
- Document editing
- Drag-and-drop
- Cross-document messaging[40]
- Browser history management
- MIME type and protocol handler registration
- Microdata
- Web Storage, a key-value pair storage framework that provides behaviour similar to cookies but with larger storage capacity and improved API.[41]
Not all of the above technologies are included in the W3C HTML5 specification, though they are in the WHATWG HTML specification.[42] Some related technologies, which are not part of either the W3C HTML5 or the WHATWG HTML specification, are as follows. The W3C publishes specifications for these separately:
- Geolocation
- Web SQL Database, a local SQL Database (no longer maintained).[43]
- The Indexed Database API, an indexed hierarchical key-value store (formerly WebSimpleDB).[44]
- HTML5 File API,[45] handles file uploads and file manipulation.[46]
- Directories and System, an API intended to satisfy client-side-storage use cases not well served by databases.[47]
- File Writer, an API for writing to files from web applications.[48]
- Web Audio API,[49] a high-level JavaScript API for processing and synthesizing audio in web applications.
- ClassList API[50]
HTML5 cannot provide animation within web pages. Additional JavaScript or CSS3 functionality is necessary for animating HTML elements. Animation is also possible using JavaScript and HTML 4[51][not in citation given], and within SVG elements through SMIL, although browser support of the latter remains uneven as of 2011.
No comments:
Post a Comment