Using webrequest api with event page

前端 未结 2 556
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-25 11:12

When using webrequest api with event page, get the error :

The \'webRequest\' API cannot be used with event pages.

Looking on t

相关标签:
2条回答
  • 2020-12-25 11:21

    For those who don't want to use the new Event Pages and would prefer to stick with Background Pages, make sure to set "persistent": true in your manifest file's background property.

    "background": {
        "scripts": ["bootstrap.js"],
        "persistent": true
      },
    
    0 讨论(0)
  • 2020-12-25 11:42

    Found declarativeWebRequest API, that would be the solution.

    Avalaible now in dev and beta channels.

    0 讨论(0)
提交回复
热议问题