chore: initial linting fixes for JS in docs/fiddles (#37689)
This commit is contained in:
parent
be32740991
commit
db27b9f433
45 changed files with 122 additions and 134 deletions
|
@ -1,6 +1,6 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
|
||||
ipcMain.on('create-frameless-window', (event, {url}) => {
|
||||
ipcMain.on('create-frameless-window', (event, { url }) => {
|
||||
const win = new BrowserWindow({ frame: false })
|
||||
win.loadURL(url)
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
|
||||
ipcMain.on('create-frameless-window', (event, {url}) => {
|
||||
ipcMain.on('create-frameless-window', (event, { url }) => {
|
||||
const win = new BrowserWindow({ frame: false })
|
||||
win.loadURL(url)
|
||||
})
|
||||
|
|
|
@ -4,7 +4,7 @@ const { app, BrowserWindow, ipcMain } = require('electron')
|
|||
ipcMain.on('create-demo-window', (event) => {
|
||||
const win = new BrowserWindow({ width: 400, height: 275 })
|
||||
|
||||
function updateReply() {
|
||||
function updateReply () {
|
||||
event.sender.send('bounds-changed', {
|
||||
size: win.getSize(),
|
||||
position: win.getPosition()
|
||||
|
|
|
@ -5,10 +5,10 @@ const link = document.getElementById('browser-window-link')
|
|||
|
||||
newWindowBtn.addEventListener('click', (event) => {
|
||||
const url = 'https://electronjs.org'
|
||||
ipcRenderer.send('new-window', { url, width: 400, height: 320 });
|
||||
ipcRenderer.send('new-window', { url, width: 400, height: 320 })
|
||||
})
|
||||
|
||||
link.addEventListener('click', (e) => {
|
||||
e.preventDefault()
|
||||
shell.openExternal("https://electronjs.org/docs/api/browser-window")
|
||||
shell.openExternal('https://electronjs.org/docs/api/browser-window')
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue