0

In chrome extension popup html (page that is shown when you click on chrome extension icon) I am trying to render a template. I added underscore library and I've written a small template.

var html = _.template("<p>Blah Blah Blah</p>");

$("body").append(html);

When I do this, I get the following error:

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".

I'm trying to find a way of using templates in popup pages.

sublime
  • 4,013
  • 9
  • 53
  • 92

0 Answers0