docs: fix win.setIcon ts type (#20980)

* docs: fix win.setIcon ts type

* test: update smoke tests
This commit is contained in:
trop[bot]
2019-11-05 21:25:57 -08:00
committed by Samuel Attard
parent 0a3b0391f4
commit daa61688b1
2 changed files with 14 additions and 13 deletions

View File

@@ -1553,7 +1553,7 @@ Same as `webContents.showDefinitionForSelection()`.
#### `win.setIcon(icon)` _Windows_ _Linux_
* `icon` [NativeImage](native-image.md)
* `icon` [NativeImage](native-image.md) | String
Changes window icon.

View File

@@ -318,17 +318,6 @@ app.setAboutPanelOptions({
version: '1.2.3'
})
let window = new BrowserWindow()
window.setProgressBar(0.5)
window.setRepresentedFilename('/etc/passwd')
window.setDocumentEdited(true)
window.previewFile('/path/to/file')
window.previewFile('/path/to/file', 'Displayed Name')
window.setVibrancy('menu')
window.setVibrancy('titlebar')
window.setVibrancy('selection')
window.setVibrancy('popover')
// Online/Offline Event Detection
// https://github.com/atom/electron/blob/master/docs/tutorial/online-offline-events.md
@@ -448,7 +437,7 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName, releaseDa
console.log('update-downloaded', releaseNotes, releaseName, releaseDate, updateURL)
})
// browser-window
// BrowserWindow
// https://github.com/atom/electron/blob/master/docs/api/browser-window.md
let win3 = new BrowserWindow({ width: 800, height: 600, show: false })
@@ -462,6 +451,18 @@ win3.show()
const toolbarRect = document.getElementById('toolbar').getBoundingClientRect()
win3.setSheetOffset(toolbarRect.height)
let window = new BrowserWindow()
window.setProgressBar(0.5)
window.setRepresentedFilename('/etc/passwd')
window.setDocumentEdited(true)
window.previewFile('/path/to/file')
window.previewFile('/path/to/file', 'Displayed Name')
window.setVibrancy('menu')
window.setVibrancy('titlebar')
window.setVibrancy('selection')
window.setVibrancy('popover')
window.setIcon('/path/to/icon')
const installed = BrowserWindow.getDevToolsExtensions().hasOwnProperty('devtron')
// content-tracing