HTML 5 is the 5th major version of the World Wide Web core language, launched in 2004 by the network Rich Text Technology Working Group (WHATWG). While standards are still in the works, some browsers have been able to support some of the features of HTML 5, such as Safari 4 beta;51cto.com reported last week about Apple's preemptive support for HTML5 video features. Today we're going to look at the progress of HTML5 in terms of support and substitution for JavaScript.
。
Scripting APIs in HTML 5
HTML5 's new features give full consideration to application developers, and HTML 5 introduces a large number of new JavaScript APIs. You can use this content to relate to the corresponding HTML elements, which include:
A two-dimensional drawing API that can be used on a new canvas (Canvas) element to render images, game graphics, or other running visual graphics.
An API that allows Web applications to register themselves as a protocol or MIME type.
An API that introduces a new caching mechanism to support offline Web applications.
An API that can play video and audio, using new videos and audio elements.
A history API that exposes the history that is being browsed, allowing the page to better support the fallback functionality in AJAX applications.
Cross-document messaging, which provides a way for documents to communicate with each other without regard to their source domain, and to some extent this is designed to prevent Cross-site scripting attacks.
An API that supports drag-and-drop operations, which can be associated with the draggable attribute.
An API that supports editing operations that can be associated with a new global contenteditable attribute.
A new network API that enables Web applications to communicate with each other on the local network and maintain two-way communication on their source servers.
Use the key/value pairs of the JavaScript API to implement persistent storage of the client, while supporting the embedded SQL database.
The event sent by the server, which can be associated with the new event source (Event-source) element, the new event source element facilitates a persistent connection to the remote data source, and greatly eliminates the need for polling in the Web application.
You may ask, HTML5 basically can replace JavaScript, have HTML5, we still need JS? Yui Development team members Matt & Eric explained this:
The JavaScript framework's role is to improve the programming environment with richer APIs and transparent cross-browser support. Yui will follow the HTML5 standards (especially those who have been affected by the browser), and add to the old version of the browser support, so that the new features can be implemented and promoted before the standard to be applied. The client storage API is an example that Yui will implement to eliminate the differences between HTML 5 and existing browsers.
The combination of HTML, CSS, and JavaScript has proven to be very practical and versatile, and every technology is progressing positively and there is no need to replace them. As with the improvement of HTML5, they will continue to improve and develop in their respective application scenarios.