← Back to release summary

Return null from contentDocument and getSVGDocument() on cross-origin access

Category
DOM
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
None

Summary

Change the contentDocument attribute and the getSVGDocument() method of HTMLEmbedElement, HTMLIframeElement, and HTMLObjectElement to return null on cross-origin access, rather than throwing an exception.

Standards & signals

Ecosystem

Docs: https://html.spec.whatwg.org/multipage/iframe-embed-object.html#dom-iframe-contentdocument https://html.spec.whatwg.org/multipage/embedded-content-other.html#dom-media-getsvgdocument https://html.spec.whatwg.org/multipage/browsers.html#concept-bcc-content-document

View on chromestatus.com