contentDocument

Returns a Document, the active document in the inline frame's nested browsing context.

Example of contentDocument

var iframeDocument = document.getElementsByTagName("iframe")[0].contentDocument;

iframeDocument.body.style.backgroundColor = "blue";
// This would turn the iframe blue.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) 8.0 (Yes) (Yes)
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support (Yes) (Yes) 1.0.1 ? (Yes) (Yes) (Yes)

Document Tags and Contributors

Contributors to this page: ryanpcmcquen
Last updated by: ryanpcmcquen,