When bundling visualsearch into my Chrome extension I was pretty confused about the errors I was getting. Eventually, I tracked it to the use of _.template which uses eval(). The default content security policy I had enabled forbids this.
I've explicitly whitelisted eval for the scripts I include, but it would be great if we could find a way to avoid this. These templates aren't so complicated that it wouldn't be really simple to do the facet loop imperatively. The other two "templates" don't even appear to have replacements and could simply be strings rather than templates.
Problem is that for version 0.5.0 they all use template variables. I'd be open to a pull request if somebody wants to take the time to rewrite the templates so that they no longer rely on Underscore's _.template.
When bundling visualsearch into my Chrome extension I was pretty confused about the errors I was getting. Eventually, I tracked it to the use of
_.template
which useseval()
. The default content security policy I had enabled forbids this.I've explicitly whitelisted eval for the scripts I include, but it would be great if we could find a way to avoid this. These templates aren't so complicated that it wouldn't be really simple to do the facet loop imperatively. The other two "templates" don't even appear to have replacements and could simply be strings rather than templates.