getstation / electron-chrome-extension

Implementation of Chrome extension APIs for Electron
139 stars 26 forks source link

Add WebRequest API #7

Closed hugomano closed 6 years ago

hugomano commented 6 years ago

Todo

hugomano commented 6 years ago

@alexstrat, right now the electrons api works well, tested with custom agent header. The cancel callback work also in the dummy extension callback({cancel: false, requestHeaders: details.requestHeaders}). The cycle is complete between main and renderer processes but the electron don't handle rules.

Lulumi implementation: Injector WebRequestEvent Browser side

Chromium: API

hugomano commented 6 years ago
capture d ecran 2017-11-23 a 20 04 30

@alexstrat WTF?

Tab console on the left and background console on the right... Log same lines

hugomano commented 6 years ago

@alexstrat ready for a review. I've tried to abstract the RPC but it's not really necessary I think. We will add a lot of lines for the same behaviour.

hugomano commented 6 years ago

@alexstrat done

alexstrat commented 6 years ago

@hugomano regarding abstraction, I suggested something in https://github.com/getstation/electron-chrome-extension/pull/8. It's only pseudo-code. Let me know if it helps

alexstrat commented 6 years ago

One last non minor change and we're good to go ;)