Chrome extension: Uncaught Error: Code generation from strings disallowed for this context

前端 未结 4 897
离开以前
离开以前 2021-01-14 09:33

I am trying to use micro template engine in chrome extension and getting the following error : Uncaught Error: Code generation from strings disallowed for this context

4条回答
  •  独厮守ぢ
    2021-01-14 10:07

    This templating library can't be used in a regular extension page because it uses new Function() with a string, which is now disallowed under Chrome's new Content Security Policy for extensions created with manifest version 2. see here

提交回复
热议问题