{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/4036","labels_url":"https://api.github.com/repos/atom/electron/issues/4036/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/4036/comments","events_url":"https://api.github.com/repos/atom/electron/issues/4036/events","html_url":"https://github.com/atom/electron/issues/4036","id":125717143,"number":4036,"title":"BrowserWindow.webContent.session.webRequest.on__ methods only work with defaultSession","user":{"login":"christoth","id":2223480,"avatar_url":"https://avatars.githubusercontent.com/u/2223480?v=3","gravatar_id":"","url":"https://api.github.com/users/christoth","html_url":"https://github.com/christoth","followers_url":"https://api.github.com/users/christoth/followers","following_url":"https://api.github.com/users/christoth/following{/other_user}","gists_url":"https://api.github.com/users/christoth/gists{/gist_id}","starred_url":"https://api.github.com/users/christoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christoth/subscriptions","organizations_url":"https://api.github.com/users/christoth/orgs","repos_url":"https://api.github.com/users/christoth/repos","events_url":"https://api.github.com/users/christoth/events{/privacy}","received_events_url":"https://api.github.com/users/christoth/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-08T23:38:11Z","updated_at":"2016-01-12T00:51:53Z","closed_at":"2016-01-11T06:04:23Z","body":"BrowserWindow.webContent.session.webRequest.on__ methods only work with defaultSession.\r\n\r\nThe webRequest lifecycle event listeners do not fire if registered to a session created with Session.fromPartition() and then assigned to the browserWindow.webContents.session.\r\n\r\ne.g. (doesn't work)\r\nvar mainSession = require('electron').session.fromPartition('000');\r\nmainWindow.webContents.session = mainSession;\r\n\r\nUsing 0.36.3 on Win7x64."},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/170745677","html_url":"https://github.com/atom/electron/issues/4036#issuecomment-170745677","issue_url":"https://api.github.com/repos/atom/electron/issues/4036","id":170745677,"user":{"login":"christoth","id":2223480,"avatar_url":"https://avatars.githubusercontent.com/u/2223480?v=3","gravatar_id":"","url":"https://api.github.com/users/christoth","html_url":"https://github.com/christoth","followers_url":"https://api.github.com/users/christoth/followers","following_url":"https://api.github.com/users/christoth/following{/other_user}","gists_url":"https://api.github.com/users/christoth/gists{/gist_id}","starred_url":"https://api.github.com/users/christoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christoth/subscriptions","organizations_url":"https://api.github.com/users/christoth/orgs","repos_url":"https://api.github.com/users/christoth/repos","events_url":"https://api.github.com/users/christoth/events{/privacy}","received_events_url":"https://api.github.com/users/christoth/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T00:51:53Z","updated_at":"2016-01-12T00:51:53Z","body":"@zcbenz Thanks, I missed the relationship between the BrowserWindow webPreferences.partition and the webContents session.  Would it make sense to rename the property sessionPartition?"}}