何らかの理由でchromeがdocument.domainをサポートしなくなり、サブドメインとiframeを含むサブドメインを含むiframeで行が読み取られるとエラーが発生します。とにかくこれの周りにはありますか?document.domainのChromeソリューション
エラー:不明なエラー:SECURITY_ERR:DOM例外18
何らかの理由でchromeがdocument.domainをサポートしなくなり、サブドメインとiframeを含むサブドメインを含むiframeで行が読み取られるとエラーが発生します。とにかくこれの周りにはありますか?document.domainのChromeソリューション
エラー:不明なエラー:SECURITY_ERR:DOM例外18
ドキュメントドメインが小文字である必要があり、ルールはこのようなものです:念の誰に
// Actual domain is "www.foo.com"
document.domain = "foo.com"; // this is valid
// Actual domain is "bar.foo.com"
document.domain = "www.foo.com"; // this is invalid, "bar.foo.com" is not a subdomain of "www.foo.com"
// Actual domain is "blah.bar.foo.com"
document.domain = "bar.foo.com" // Ok
document.domain = "foo.com" // Still ok
document.domain = "bar.foo.com" // Invalid, you can't change it back to a more specific domain.
document.domain
限り、あなたは、同じドメインにしているとのiframeのために働く必要があります:あなたは、ドキュメントにアクセスしようとしている場合
iframe=document.querySelector('iframe');
console.log(iframe.contentDocument.domain)
親フレームとは別のドメインにあるiframeのうち、あなたが見ているセキュリティエラーが発生します。あなたは、クロスドメインの問題に実行されますので、サブドメインが、あまりにも異なるドメインと見なされていることを
参照を探しています:https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy – juminoz