HTML5 New API’s and Changed API’s

APIs

HTML5 has introduced many new APIs and have extended, changed or obsoleted some existing APIs.

5.1 New APIs

HTML5 introduces a number of APIs that help in creating Web applications. These can be used together with the new elements introduced for applications:

  • Media elements (video and audio) have APIs for controlling playback, syncronising multiple media elements, and timed text tracks (e.g. subtitles).
  • An API for form constraint validation (e.g. the setCustomValidity() method).
  • An API for commands that the user can invoke (used together with the command element among others).
  • An API that enables offline Web applications, with an application cache.
  • An API that allows a Web application to register itself for certain protocols or media types, using registerProtocolHandler() and registerContentHandler() .
  • Editing API in combination with a new global contenteditable attribute.
  • Drag & drop API in combination with a draggable attribute.
  • An API that exposes the components of the document’s URL and allows scripts to navigate, redirect and reload (the Location interface).
  • An API that exposes the session history and allows scripts to update the document’s URL without actually navigating, so that applications don’t need to abuse the fragment component for “Ajax-style” navigation (the History interface).
  • An API for base64 conversion (atob() and btoa() methods).
  • An API to schedule timer-based callbacks (setTimeout() and setInterval()).
  • An API to prompt the user (alert()confirm()prompt()showModalDialog()).
  • An API for printing the document (print()).
  • An API for handling search providers (AddSearchProvider() and IsSearchProviderInstalled()).
  • The Window object has been defined.

WHATWG HTML has further APIs that are not in HTML5 but are separate specifications at the W3C:

5.2 Changed APIs

The following features from DOM Level 2 HTML are changed in various ways:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s