CKeditor in Chrome Extension popup issued: “Refused to load frame from ‘about:blank’ because of Content-Security-Policy.”
I am trying to get a chrome extension updated to work with the manifest 2 and new Chrome API’s that have currently broken the plugin with the latest version release 18.0.1025.142.
I am using CKEditor in a popup window that is issued by a background page in the extension.
But I get the Refused to load frame from 'about:blank' because of Content-Security-Policy.2 error — is there a way to get around this?
Update
This could be related: http://code.google.com/p/chromium/issues/detail?id=77947&q=Error%20during%20tabs.executeScript%3A&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20Area%20Feature%20Status%20Owner%20Summary
In Chrome extensions, you cannot access or modify content from protocols other than
file:,http:,ftp:andchrome-extension:(data:,blob:andfilesystem:when the page created the resource themselves).I considered four approaches to solve the problem:
beforeloadevent to the document, and change the URL when it matchesabout:blank.Does not work: The CSP is activated before this event is fired.
DOMNodeInsertedevent to the document, and check forabout:blankiframes.Does not work: The CSP is activated before this event is fired.
webRequestAPI to intercept the request.Does not work: The strict match patterns do not allow the
about:protocol.srcproperty before inserting the IFRAME in the document:document.createElementfor IFrames, orappendChild,insertBeforeandreplaceChildmethods for Iframes.For all methods, you have to create a dummy page, say
blank.htmlwithin your extension, and allow access viaweb_accessible_resources.Manifest file example (last four lines are important):
aboutblank.jsNote: Option 1 is recommended over modifying these prototype methods. Also, the prototype method does not work for
<iframes>injected using.innerHTML.