Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6104865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:53:28+00:00 2026-05-23T13:53:28+00:00

What exactly does contentDocument represent for an iframe (or even the old frame element)?

  • 0

What exactly does “contentDocument” represent for an iframe (or even the old “frame” element)? Is it equivalent to the “html” element or the “body” element ?
What is it’s use?
And is this property supported across all the browsers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:53:29+00:00Added an answer on May 23, 2026 at 1:53 pm

    w3.org

    contentDocument of type Document, readonly, introduced in DOM Level 2
    The document this frame contains, if there is any and it is available, or null otherwise.

    MDN

    From the DOM iframe element, scripts can get access to the window object of the included HTML page via the contentWindow property. The contentDocument property refers to the document element inside the iframe (this is equivalent to contentWindow.document), but is not supported by Internet Explorer versions before IE8.

    msdn

    the document this page or frame contains
    This property is new in Windows Internet Explorer 8

    So to get the innerHTML of the body element you could use

    iframe.contentDocument.getElementsByTagName("body")[0]

    or

    iframe.contentDocument.body

    in todays browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me what exactly does this Java code do? SecureRandom random =
What exactly does this mean? $number = ( 3 - 2 + 7 )
I have a form tag that has action=. . What exactly does this mean?
What exactly does this instruction do? I know that it tries to align data
How exactly does one implement two separate tableviews on one view like in this
What exactly does this mean -- Maybe IRB bug!? What does that tell me
What exactly does the File's Owner and First Responder Placeholder in Xcode represent?
I was wondering what this snippet exactly does? (found here: http://code.google.com/p/google-app-engine-samples/source/browse/trunk/django_example/django_bootstrap.py ) # Make
Possible Duplicate: Reference - What does this symbol mean in PHP? What exactly does
Can i use jQuery unbind() with live() e.g. $(.content_media).unbind(touchstart).live(touchstart,function(){....}); If yes, what exactly does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.