Support » Plugin: Auto iFrame » Uncaught DOMException: Failed to read the ‘contentDocument’ property

  • Resolved Salocin.TEN

    (@salocinten)


    Hi,

    I got the following in the browser console.

    auto-iframe.js:6 Uncaught DOMException: Failed to read the ‘contentDocument’ property from ‘HTMLIFrameElement’: Blocked a frame with origin “[my website url]” from accessing a cross-origin frame.
    at AutoiFrameAdjustiFrameHeight ([my website url]/wp-content/plugins/auto-iframe/auto-iframe.js:6:13)

    Any idea why is it doing this?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is because your iframe page is not on the same domain.

    This plugin is not able to resize to the content height. Please check the plugin https://wordpress.org/plugins/advanced-iframe/ where this is supported.
    If you are able to add one line of Javascript to the remote site you can do auto height.

    Best, Michael

    Plugin Author Greg Ross

    (@gregross)

    Correct, browser security does not allow cross site reading of properties, as in the FAQ, both the parent page and the iframe source must be the same domain name.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught DOMException: Failed to read the ‘contentDocument’ property’ is closed to new replies.