JavaScript template library that doesn't use eval/new Function

前端 未结 10 1239
抹茶落季
抹茶落季 2021-02-05 17:52

Google Chrome extensions using manifest_version: 2 are restricted from using eval or new Function. All of the JavaScript templating librar

10条回答
  •  春和景丽
    2021-02-05 18:30

    The best solution to this problem is to pre-compile your templates before you deploy your extension. Both handlebarsjs and eco offer pre-compilation as a feature. I actually wrote a blog post that goes into more depth.

提交回复
热议问题