API preview JavaScript and HTML5 scripts

Source: Internet
Author: User
Tags implement new features version client

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.

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.