new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · API · all subjects

session/properties

12 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

session.defaultSession property

session.defaultSession is a Session object representing the default session of the app. It is available after app.whenReady is called.

session.availableSpellCheckerLanguages property

The availableSpellCheckerLanguages property is a readonly string[] array which consists of all the known available spell checker languages. Providing a language code to the setSpellCheckerLanguages API that isn't in this array will result in an error.

session.spellCheckerEnabled property

The spellCheckerEnabled property is a boolean indicating whether the builtin spell checker is enabled.

session.storagePath property

The storagePath property is readonly and returns string | null indicating the absolute file system path where data for this session is persisted on disk. For in-memory sessions this returns null.

session.cookies property

The cookies property is a readonly Cookies object for this session.

session.extensions property

The extensions property is a readonly Extensions object for this session.

session.serviceWorkers property

The serviceWorkers property is a readonly ServiceWorkers object for this session.

session.webRequest property

The webRequest property is a readonly WebRequest object for this session.

session.protocol property

The protocol property is a readonly Protocol object for this session.

session.protocol property example

const { app, session } = require('electron') const path = require('node:path') app.whenReady().then(() => { const protocol = session.fromPartition('some-partition').protocol if (!protocol.registerFileProtocol('atom', (request, callback) => { const url = request.url.substr(7) callback({ path: path.normalize(path.join(__dirname, url)) }) })) { console.error('Failed to register protocol') } })

session.netLog property

The netLog property is a readonly NetLog object for this session.

session.netLog property example

const { app, session } = require('electron') app.whenReady().then(async () => { const netLog = session.fromPartition('some-partition').netLog netLog.startLogging('/path/to/net-log') // After some network events const path = await netLog.stopLogging() console.log('Net-logs written to', path) })

Give your agent this brain