Inter Frame Sop - Chrome Extension
In a Chrome Extension, I'm trying to get gmail compose body content. An error jumps out sporadically, and does not prevents it from working. This is being run as a content script.
Solution 1:
You can not read cross site content using javascript. XSS Auditor of Google Chorme will never allow this.
Please have a look at http://en.wikipedia.org/wiki/Same_origin_policy
UPDATE 1 -
There is support for cross site communication using window.postMessage() in Chrome 2+. Please have a look at this documentation https://developer.mozilla.org/en-US/docs/DOM/window.postMessage
Solution 2:
To give a good answer, we need more information:
- where exactly you are running this code, is it in the web page, the extension's content script or the etension's background script?
- Also, what does your manifest.json file look like? Which sites have you asked for permission to run on.
I suspect this is a case of a badly-written error message and really it is saying: your extension does not have permission to run on apis.google.com. In that case, simply add permissions for apis.google.com. More details are in the Chrome extensions docs: http://developer.chrome.com/extensions/manifest.html#permissions
Post a Comment for "Inter Frame Sop - Chrome Extension"