Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Error: Permission denied to access property "x"

エラーメッセージ

Error: Permission denied to access property "x"

エラーの種類

Error

エラーの原因

権限が与えられていないオブジェクトにアクセスしようとしています。たとえば、同一オリジンポリシーに違反する、異なるドメインからロードされた <iframe> 要素などです。

このエラーを起こすコードの例

<!DOCTYPE html>
<html>
  <head>
    <iframe id="myframe" src="https://www1.w3c-test.org/common/blank.html"></iframe>
    <script>
      console.log(document.getElementById('myframe').contentWindow.document);
      // Error: Permission denied to access property "document"
    </script>
  </head>
  <body></body>
</html>

関連項目

ドキュメントのタグと貢献者

 このページの貢献者: chikoski, YuichiNukiyama
 最終更新者: chikoski,