Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. JavaScript
  3. Reference
  4. JavaScript error reference
  5. Error: Permission denied to access property "x"

Error: Permission denied to access property "x"

The JavaScript exception "Permission denied to access property" occurs when there wasan 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

DOMException.

What went wrong?

There was attempt to access an object for which you have no permission. This is likelyan<iframe> element loaded from a different domain for which youviolated thesame-origin policy.

Examples

No permission to access document

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

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp