Documentación offline JavaScript main

Error: Permission denied to access property "x"

main Documentación oficial Licencia CC-BY-SA-2.5Descargado el 2026-08-02

En esta página

The JavaScript exception "Permission denied to access property" occurs when there was an attempt to access an object for which you have no permission.

Message#

DOMException: Blocked a frame with origin "x" from accessing a cross-origin frame. (Chromium-based)
DOMException: Permission denied to access property "x" on cross-origin object (Firefox)
SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame. Protocols, domains, and ports must match. (Safari)

Error type#

{{domxref("DOMException")}}.

What went wrong?#

There was attempt to access an object for which you have no permission. This is likely an {{HTMLElement("iframe")}} element loaded from a different domain for which you violated the same-origin policy.

Examples#

No permission to access document#

<iframe id="myframe" src="http://www1.w3c-test.org/common/blank.html"></iframe>
console.log(frames[0].document);
// Error: Permission denied to access property "document"

See also#