首页 > 解决方案 > 浏览器正在阻止来自其自己域的框架

问题描述

在此站点上:https ://mdintro.com/registration/?user_group_id=Employer我遇到了几个错误,这些错误会阻止用户在描述字段中输入文本。Chrome 和 Safari 显示此错误:

Uncaught DOMException: Blocked a frame with origin "https://mdintro.com" from accessing a cross-origin frame." fckeditorcode_gecko.js:36 ...

但为什么它会阻止来自同一域的帧?

Firefox(可能有其他标准)没有阻止这个框架,但它在 FCKeditor 上给出了以下警告:

"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ fckeditorcode_gecko.js:67:105"

有人可以帮帮我吗!?

更新: 这个站点有一个 SmartJobBoard 管理面板,它使用相同的 FCKeditor 框架,结果没有错误。Chrome 也不会在控制台上显示任何错误,管理员用户可以在文本编辑器上输入文本。它们都引用同一个 FCKeditor 扩展。

这是https://mdintro.com/registration/?user_group_id=Employer上显示的框架

<!-- USER: REGISTRATION (CONSOLE ERROR: BLOCKED) -->
<iframe 
  id="CompanyDescription___Frame" 
  src="https://mdintro.com/system/ext/fckeditor/editor/fckeditor.html?InstanceName=default_value&amp;Toolbar=BasicAdmin" 
  width="345px" height="200" frameborder="0" scrolling="no" 
  style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 345px; height: 200px;">
</iframe>

这是 SmartJobBoard 管理面板内显示的框架:

<!-- ADMIN: EDIT JOB POSTING (NO ERRORS) -->
<iframe 
  id="default_value___Frame" 
  src="https://mdintro.com/admin/../system/ext/fckeditor/editor/fckeditor.html?InstanceName=default_value&amp;Toolbar=BasicAdmin" 
  width="100%" height="200" frameborder="0" scrolling="no" 
  style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 100%; height: 200px;">
</iframe>

已解决: 我从以下位置应用了 tdebroc 的解决方案:Blocked a frame with origin "<mydomain>" from access a frame with origin "https://www.facebook.com"

标签: javascriptphphtmlfckeditor

解决方案


推荐阅读