Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7740033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:40:17+00:00 2026-06-01T08:40:17+00:00

CKeditor in Chrome Extension popup issued: Refused to load frame from ‘about:blank’ because of

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:40:18+00:00Added an answer on June 1, 2026 at 8:40 am

    In Chrome extensions, you cannot access or modify content from protocols other than file:, http:, ftp: and chrome-extension: (data:, blob: and filesystem: when the page created the resource themselves).

    I considered four approaches to solve the problem:

    1. Bind a beforeload event to the document, and change the URL when it matches about:blank.
      Does not work: The CSP is activated before this event is fired.
    2. Bind a DOMNodeInserted event to the document, and check for about:blank iframes.
      Does not work: The CSP is activated before this event is fired.
    3. Use the webRequest API to intercept the request.
      Does not work: The strict match patterns do not allow the about: protocol.
    4. Change the src property before inserting the IFRAME in the document:
      1. Either manually (best option), or
      2. Modify document.createElement for IFrames, or
      3. Modify the appendChild, insertBefore and replaceChild methods for Iframes.

    For all methods, you have to create a dummy page, say blank.html within your extension, and allow access via web_accessible_resources.

    Manifest file example (last four lines are important):

    {
      "name": "Name",
      "version": "1.0",
      "background": {"scripts": ["aboutblank.js"]},
      "manifest_version": 2,
      "content_security_policy": "default-src 'self'",
      "web_accessible_resources": ["blank.html"]
    }
    

    aboutblank.js

    var BLANK_PAGE = chrome.extension.getURL("blank.html");
    
    (function(BLANK_PAGE, createElement, appendChild, insertBefore, replaceChild) {
        HTMLDocument.prototype.createElement = function(str) {
            var elem = createElement.call(this, str);
            if (str.toUpperCase() == 'IFRAME') {
                elem.src = BLANK_PAGE;
            }
            return elem;
        };
        Element.prototype.appendChild = function(newChild) {
            iframe_check(newChild);
            return appendChild.call(this, newChild);
        };
        Element.prototype.insertBefore = function(newChild, refChild) {
            iframe_check(newChild);
            return insertBefore.call(this, newChild, refChild);
        };
        Element.prototype.replaceChild = function(newChild, refChild) {
            iframe_check(newChild);
            return replaceChild.call(this, newChild, refChild);
        };
    
        function iframe_check(elem) {
            if (elem instanceof HTMLIFrameElement && (elem.src == '' || elem.src.slice(0,11) == 'about:blank')) {
                elem.src = BLANK_PAGE;
            }
        }
    })(BLANK_PAGE,
       HTMLDocument.prototype.createElement,
       Element.prototype.appendChild,
       Element.prototype.insertBefore,
       Element.prototype.replaceChild);
    

    Note: Option 1 is recommended over modifying these prototype methods. Also, the prototype method does not work for <iframes> injected using .innerHTML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a Chrome userscript to locally auto-save content in a CKEditor . I'm
Does anybody know about CKEditor, I have integrated this application in my web app.
i am using ckeditor,now i want to translate the content in onChange event using
I'm using CKEditor in Markdown format to submit user created content. I would like
iam using ckeditor in my website to add the content to the pages. But
In FF, Opera, IE the CKEditor is working and looks great. But in Chrome
I am using CKEditor and want to allow the insertion of embed code from
Possible Duplicate: CKEditor - Set cursor position to end of text I have a
I want to use Ckeditor for Entering text and I want to save that
I've just installed CKEditor and call it with JS tag. When I save the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.