Chrome 中的 iframe 错误:未捕获的安全错误:无法从“窗口"读取“sessionStorage"属性 [英] Iframe in Chrome error: Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window'
问题描述
未捕获的安全错误:无法从窗口"读取sessionStorage"属性:此文档的访问被拒绝.
Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
不知道如何更进一步...当我所做的只是`适用于 Firefox,不适用于 Chrome.可能与 http://help.twitch.tv/customer/有关门户/问题/6299203-javascript-errors-in-chrome-
No clue how to go further on this...when all I did was ` Works in Firefox, not in Chrome. Could be something related to http://help.twitch.tv/customer/portal/questions/6299203-javascript-errors-in-chrome-
推荐答案
我在使用 localStorage 时遇到了同样的问题,并按如下方式修复:
I had the same problem with localStorage, and fixed it like this :
在设置>下隐私 >内容设置,将 cookie 的设置更改为允许设置本地数据" 或第二个选项(在我的情况下,它以前位于阻止网站来自设置任何数据).
Under Settings > Privacy > Content settings, change the cookies' settings to "Allow local data to be set" or the second option (in my case, it was previously on "Block sites from setting any data").
在较新的 Chrome 版本上,请确保在此处勾选第一个选项:chrome://settings/content/cookies
On newer Chrome versions, make sure the first option is ticked here: chrome://settings/content/cookies
这篇关于Chrome 中的 iframe 错误:未捕获的安全错误:无法从“窗口"读取“sessionStorage"属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!