问题
I have wymeditor on sub1.domain.com, which is accessed by a page on sub2.domains.com.
This line gives an error:
var styles = this._doc.styleSheets[0];
Permission denied for http://removed.example.com to get property HTMLDocument.styleSheets from http://removed2.example.com.
I am assuming this is a cross site scripting restriction, but I would like to srve my media from a different domain. How can I do this?
回答1:
Add the line document.domain = "domain.com";
in both pages, replacing domain.com
with whatever your actual domain name is.
来源:https://stackoverflow.com/questions/2206586/wymeditor-across-subdomains-cross-site-permission-issue