最近 Chrome 的更新调整了安全机制,造成 tinymce 3 无法正常使
无法插入代码,浏览器控制台报错
Uncaught DOMException: Blocked a frame with origin "https://util.cnblogs.com" from accessing a cross-origin frame.
at Object.init (https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:107)
at https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:4632
无法插入超链接
tiny_mce_popup.js:3 Uncaught DOMException: Blocked a frame with origin "https://common.cnblogs.com" from accessing a cross-origin frame.
at Object.init (https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:107)
at https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:4632
无法上传图片
Uncaught DOMException: Blocked a frame with origin "https://upload.cnblogs.com" from accessing a cross-origin frame.
at Object.init (https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:107)
at https://common.cnblogs.com/editor/tiny_mce/tiny_mce_popup.js:3:4632
请问解决这个问题?
是 Chrome 的这个变更引起的:Chrome disables modifying document.domain
插入超链接出现这个问题,是因为我们在 tinymce 的 tiny_mce_popup.js 中添加了下面的代码
document.domain = 'cnblogs.com';
最终采用了添加 Origin-Agent-Cluster: ?0
响应头的最简单解决方法
Origin-Agent-Cluster: ?0
response header跨域问题 Blocked a frame with origin "http://......" from accessing a cross-origin frame.
https://www.cnblogs.com/wt645631686/p/11134448.html
跨域打开页面:Uncaught DOMException: Blocked a frame with origin
https://www.cnblogs.com/yanweifeng/p/12377193.html
园友写过博文咯,康康