If I use underscore.js‘s _.template() 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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Unfortunately I don’t think you can use underscore.js’s _.template() from within a chrome extension…at least with the new manifest.json version 2. The same holds true for trying to use the jQuery Template plugin.
I am going to look at other templating engines that will hopefully not use the new Function object.