How to work with webRequest api


Hi all,

Can somone help me and explain what I am doing wrong in this code?

mainWindow = new BrowserWindow({width: 1280, height: 745});


var ses = mainWindow.webContents.session;

ses.webRequest.onBeforeRequest({urls: ["*/public/*"]}, function (details, callback) {

It return exception: Cannot read property onBeforeRequest of undefined

Electron version is 0.36.0


I am miss that this functionality was not included in this build. So I build electron by myself and now it works as a charm.