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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.