Load data from unsafe source in WebExtensions

Hi everybody
I am writing a extension to read epub in firefox. It worked with no big error in about:debugging. Then i compressed it and installed in firefox 47, extension worked, loaded and displayed data content from .epub. (Great :smiley: ) However, when i switch chapter, it does not display chapter (do not load data from blod: ) and notify error:
"DOMException [SecurityError: "The operation is insecure."
code: 18
nsresult: 0x80530012"
I understand that this is a “content security policy” error. How to i fix it?
Thank you

Are the sources available somewhere?

I load sources from Array Buffer of epub file. Not from external sources.
Could not load Chapter: OEBPS/GeographyofBli_copyright.html DOMException [SecurityError: "The operation is insecure."
code: 18
nsresult: 0x80530012
location: moz-extension://aedb29ad-49c0-421b-82bf-2b855609d0a7/data/lib/epub.js:6051]

I meant the source code for the add-on.

you can get source code and demo from here http://1drv.ms/1pa8fu5

It’s possible that the security error has to do with opening the file from inside your extension package, rather than from the file system. You should give that a try. It could also be that you’re missing a web_accessible_resources declaration. I also see some errors from the library when the file is first opened, so that could be related.

Thank for read. It is a demo. In my extension, i open a book in local disk used FileReader API.
Meanwhile, “web_accessible_resources” is used to configure the resources within the extension. I dont know how to use this method. I dont think this is a issue of library.

It could be a bug in the API. If you can’t find a solution, perhaps you should file it.