Skip to content

Implement HTMLIFrameElement.contentDocument #3808

Closed

Description

@jdm

This should be as easy as getting the document property from the result of GetContentWindow. We also need to check same-origin-ness and return null if they don't match. See the check in handle_load_iframe_url_msg for an example; we should probably make that a utility that can be shared (possibly even in the rust-url library!)

Spec: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-iframe-contentdocument

Activity

  1. added
    A-content/dom
    E-less-complex
    on Oct 25, 2014
  2. neojski commented on Nov 6, 2014

    @neojski
    Contributor

    I will work on it.

  3. added
    C-assigned
    on Nov 6, 2014
  4. neojski commented on Nov 9, 2014

    @neojski
    Contributor

    Soo, I have the patch in my branch.

    But I cannot pull request it because #3932 is blocking it or, in fact, it's blocking testing my patch.

    And if I understand correctly (see discussion in #3939) I don't have to implement cross-origin checks. Right now it'll be safe because getting contentWindow will fail for cross-origin stuff. And I'm implementing it just as returning contentWindow.document.

  5. jdm commented on Nov 9, 2014

    @jdm
    MemberAuthor

    Yeah, it looks like getting anything non-null for a cross-origin contentWindow will be an involved project. It might be nice to throw a same-origin assertion into the code, just so that we break loudly whenever we end up making it work.

  6. added 6 commits that reference this issue on Nov 10, 2014
    04985c7
    9577279
    594cfce
    8bd59d7
    1d85cd5
    af30484
  7. added 2 commits that reference this issue on Dec 3, 2014
    d854b4c
    7db1dd7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domC-assignedE-less-complex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions