We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support43 Yes Yes8 Yes10
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes ?4 Yes Yes ?

Document Tags and Contributors

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