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

web-contents/filesystem

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

contents.savePage(fullPath, saveType) - save page to disk

Saves the web page to disk. Returns Promise<void> - resolves if the page is saved. Parameters: fullPath (string) - the absolute file path, saveType (string) - specify the save type ('HTMLOnly' - save only the HTML of the page, 'HTMLComplete' - save complete-html page, 'MHTML' - save complete-html page as MHTML).

savePage() example

const { BrowserWindow } = require('electron') const win = new BrowserWindow() win.loadURL('https://github.com') win.webContents.on('did-finish-load', async () => { win.webContents.savePage('/tmp/test.html', 'HTMLComplete').then(() => { console.log('Page was saved successfully.') }).catch(err => { console.log(err) }) })

Give your agent this brain