Add initial cookie changed event support
This commit is contained in:
parent
5d23d165a9
commit
24bcf6ac16
9 changed files with 156 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
const {EventEmitter} = require('events')
|
||||
const {app} = require('electron')
|
||||
const {fromPartition, Session} = process.atomBinding('session')
|
||||
const {fromPartition, Session, Cookies} = process.atomBinding('session')
|
||||
|
||||
// Public API.
|
||||
Object.defineProperties(exports, {
|
||||
|
@ -15,6 +15,7 @@ Object.defineProperties(exports, {
|
|||
})
|
||||
|
||||
Object.setPrototypeOf(Session.prototype, EventEmitter.prototype)
|
||||
Object.setPrototypeOf(Cookies.prototype, EventEmitter.prototype)
|
||||
|
||||
Session.prototype._init = function () {
|
||||
app.emit('session-created', this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue