Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using webrequest api with event page

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

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

Looking on the net, I found this topic : http://code.google.com/p/chromium/issues/detail?id=119613

My questions : why can't (or how can) we use both ?

like image 447
Menencia Avatar asked Nov 10 '12 21:11

Menencia


2 Answers

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   }, 
like image 70
Hartley Brody Avatar answered Sep 25 '22 19:09

Hartley Brody


Found declarativeWebRequest API, that would be the solution.

Avalaible now in dev and beta channels.

like image 34
Menencia Avatar answered Sep 21 '22 19:09

Menencia