8 个值得了解的实用 HTML5 APIs

jopen 11年前

HTML5提出了许多有用的功能在新的API中,使其在短短的几年里能够在网页设计师和开发人员中流行起来。有一些工具可在互联网上建立互动和有效的Web应用程序。也有一些非常有用的API,帮助开发者高效建立网站与一些强大的功能 - 如在线视频游戏,网页知名度,测试代码的性能,衡量应用程序的性能等。

1) HTML5 APIs –  User Timing API 

This specification defines an interface to help web developers measure the performance of their applications by giving them access to high precision timestamps. Web developers need the ability to assess and understand the performance characteristics of their applications. the PerformanceMark and PerformanceMeasure interfaces, and extensions to the Performance interface, which expose a high precision timestamp to developers so they can better measure the performance of their applications.

 

8 个值得了解的实用 HTML5 APIs

2) HTML5 API –  Vibration

The API is specifically designed to address use cases that require simple tactile feedback only. Use cases requiring more fine-grained control are out of scope for this specification.

 

8 个值得了解的实用 HTML5 APIs

3) HTML5 API –  Element Classlist

 

8 个值得了解的实用 HTML5 APIs

4) HTML5 API –  High Resolution Time API

This specification defines a JavaScript interface that provides the current time in sub-millisecond resolution and such that it is not subject to system clock skew or adjustments.

 

8 个值得了解的实用 HTML5 APIs

5) HTML5 API –  Speech Synthesis API

The SpeechSynthesis interface is the scripted web API for controlling a text-to-speech output.

 

8 个值得了解的实用 HTML5 APIs

6) HTML5 API –  Dataset API 

The dataset IDL attribute provides convenient accessors for all the data-* attributes on an element. On getting, the dataset IDL attribute must return a DOMStringMap object, associated with the  algorithms.

 

8 个值得了解的实用 HTML5 APIs

7) HTML5 API –  Web Speech API

This specification defines a JavaScript API to enable web developers to incorporate speech recognition and synthesis into their web pages. It enables developers to use scripting to generate text-to-speech output and to use speech recognition as an input for forms, continuous dictation and control. The JavaScript API allows web pages to control activation and timing and to handle results and alternatives.

 

8 个值得了解的实用 HTML5 APIs

8) HTML5 API - Page Visibility

The Page Visibility specification defines a means for site developers to programmatically determine the current visibility of a document and be notified of visibility changes. Without knowing the visibility state of a page, web developers have been designing webpages as if they are always visible.

 

8 个值得了解的实用 HTML5 APIs