HTML and CSS Reference
In-Depth Information
A.2.3. Canvas and SVG (interactive media)
The Canvas API and SVG give you the ability to create interactive media via JavaScript
programming. The first and most popular Canvas API was originally an Apple product
from Mac OS X. Developers can create raster-based graphics on the fly inside a <can-
vas> element with it. Although the <canvas> element itself is covered in the core
HTML5 spec, the 2D context (the JavaScript API that lets you draw stuff) is in a separate
specification called “HTML Canvas 2D Context.” Note that although WebGL allows Can-
vas to display 3D graphics, the 3D context is not officially part of HTML5 (see sectionA.3
for details).
SVG is an XML-based language that's been around since 2001. All HTML5 adds is the
ability to inject SVG elements into HTML pages (it has always been allowed to inject SVG
into XHTML pages), nothing more. It's important to understand that SVG is a piece of
HTML5 but not a specification created by it.
Canvas, the 2D context, and SVG are covered in chapters 6 and 7 ; Canvas is also used in
chapter 8 to manipulate live video and in chapter 9 along with the 3D context.
A.2.4. Storage
HTML5 is associated with several storage-based APIs; the ones that are part of the HTML5
specifications are Web Storage and Offline Applications.
At W3C, offline apps are covered in the core HTML5 spec, and session and local storage
are covered by the Web Storage spec. Both are discussed in chapter 5 .
A.2.5. Messaging
Web Messaging (cross-document and channel messaging), Server-Sent Events, and We-
bSockets are all core HTML5 technologies. At W3C they are covered by three specs:
“HTML5 Web Messaging,” “Server-Sent Events,” and “WebSockets API.” Note that the
WebSockets Protocol, which describes the format of the transmitted data, is defined by
a specification at the Internet Engineering Task Force (IETF). Messaging is covered in
chapter 4 and appendix F .
Search WWH ::




Custom Search