Chapter 12. Embedded Media

HTML and JavaScript are a killer combination, but sometimes more is required to create a modern web application. Therefore, HTML enables web developers to integrate other content in a site; generally, you need a browser plug-in for that. This chapter shows how to access this content and gives a few pointers for the most widely used content types. Note that most phrases in this chapter do not come with code downloads.

Accessing Embedded Media

Example . 

document.media

The “official” HTML element to embed media is <object>. However, to have a cross-browser site, usually an <embed> object is embedded within the <object> element. To make accessing the embedded object as easy as possible, the <object> element’s id attribute ...

Get JavaScript™ Phrasebook: Essential Code and Commands now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.