Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

causes error from Chrome extension #41

Closed
lyricat opened this Issue Aug 6, 2012 · 2 comments

Comments

Projects
None yet
3 participants

lyricat commented Aug 6, 2012

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.

Collaborator

epoberezkin commented Oct 30, 2016

@lyricat I believe it is answered, please reopen if there is still the question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment