docs: use electron/main & electron/renderer imports in fiddles (#39666)
This commit is contained in:
parent
d42a94ddde
commit
f2f83a73fc
70 changed files with 78 additions and 88 deletions
|
@ -1,5 +1,5 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron')
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron/main')
|
||||
|
||||
ipcMain.on('create-frameless-window', (event, { url }) => {
|
||||
const win = new BrowserWindow({ frame: false })
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { ipcRenderer } = require('electron')
|
||||
const { ipcRenderer } = require('electron/renderer')
|
||||
|
||||
const newWindowBtn = document.getElementById('frameless-window')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron')
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron/main')
|
||||
|
||||
ipcMain.on('create-demo-window', (event) => {
|
||||
const win = new BrowserWindow({ width: 400, height: 275 })
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { ipcRenderer } = require('electron')
|
||||
const { ipcRenderer } = require('electron/renderer')
|
||||
|
||||
const manageWindowBtn = document.getElementById('manage-window')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron')
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron/main')
|
||||
|
||||
ipcMain.on('new-window', (event, { url, width, height }) => {
|
||||
const win = new BrowserWindow({ width, height })
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { ipcRenderer } = require('electron')
|
||||
const { ipcRenderer } = require('electron/renderer')
|
||||
|
||||
const newWindowBtn = document.getElementById('new-window')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron')
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron/main')
|
||||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { ipcRenderer } = require('electron')
|
||||
const { ipcRenderer } = require('electron/renderer')
|
||||
|
||||
const listenToWindowBtn = document.getElementById('listen-to-window')
|
||||
const focusModalBtn = document.getElementById('focus-on-modal-window')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue