Skip to content


Subversion checkout URL

You can clone with
Download ZIP


causes error from Chrome extension #41

lyricat opened this Issue · 1 comment

2 participants


Hi, thank you for awesome work! I like doT very much and I think it's the best js template library.

In a project I use doT.js from inside a Google Chrome extension I get the following error in the console:

Uncaught Error: Code generation from strings disallowed for this context

Is there any way to get past this error?

PS: this error causes after I change the manifest_version from 1 to 2, and then doT doesn't work because Content Security Policy


If you don't need dynamically create templates code, you can take a look at my repo.
I've made possibilities for caching and even loading precompiled templates into cache.
So you can store templates in separate files, then compile them all in one .js file and include it in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.