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 8330993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:17:26+00:00 2026-06-09T02:17:26+00:00

I upgraded my manifest_version to 2 as per this document , and then was

  • 0

I upgraded my manifest_version to “2” as per this document, and then was suprised to see chrome burping up errors like:

Refused to execute inline script because it violates the following Content Security Policy directive

While it is clear why they would do this, I am now unclear how i should be managing Module load progress events. Even if i ratchet it to the latest (dev) pepper release, the documentation is still recommending an inline script (which obviously doesn’t work).

I am a bit frustrated (after spending a weekend afternoon coding up a module load with progress) to see this version flip and render my stuff completely invalid.

So, yeah…it is for the greater good. I understand. But now i have to have a standalone javascript file (with its own load paradigm) and hook up to the <embed/> element in time to catch events correctly? What is the new and improved method for doing this now?

Can anyone suggest a reliable alternative to this sanctioned boilerplate?

  • 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-09T02:17:27+00:00Added an answer on June 9, 2026 at 2:17 am

    According to the documentation for NaCl progress events, event listeners have to be added as follows:

    <div id="listener">
      <script type="text/javascript">
        document.getElementById('listener').addEventListener('load', function() {
            // Example
        }, true);
      </script>
      <embed name="nacl_module" ... type="application/x-nacl" />
    </div>
    

    This if forbidden by the Content security policy (see also). There’s only one way to solve it: By moving the script to an external file:

    <div id="listener">
      <script src="listener-load.js"></script>
      <embed name="nacl_module" ... type="application/x-nacl" />
    </div>
    
    // listener-load.js:
    document.getElementById('listener').addEventListener('load', ..., true);
    

    Because the construction of the DOM blocks until the external file is loaded, the script is loaded before the <embed> tag is inserted. Since the external files are packaged with the extension, the impact on performance can be neglected.

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

Sidebar

Related Questions

I upgraded a Rails 3.0 app to Rails 3.1 which involved putting this /*
Upgraded form Rails 2 to 3. And RSpec 1 to 2. It looks like
I upgraded from async_sinatra 0.5.0 to 1.0 because the latter fixed this problem So
Upgraded server Framework to 4.0. Using Godaddy hosting. The website is now showing this
Something upgraded my Microsoft.Data.Entity.Design to version 10.6.10617.1. This broke some EntityFramework code generators which
I upgraded to Play 1.2.1 this morning so I could make use of their
I upgraded to django 1.2 and I now get this error message which looks
Or something like that. I've upgraded several apps from Rails 3.0 to Rails 3.1.
my application for google chrome no longer works, i upgraded as oer google to
My AndroidManifest.xml looks like this: <manifest ...> <application ...> ... </application> <uses-sdk ... />

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.