docs: enable contextIsolation in fiddles (#39613)

This commit is contained in:
Milan Burda 2023-08-29 21:52:16 +02:00 committed by GitHub
parent 2e79f34c84
commit 9280b79112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 206 additions and 233 deletions

View file

@ -1,13 +1,11 @@
const { ipcRenderer } = require('electron/renderer')
const manageWindowBtn = document.getElementById('manage-window')
ipcRenderer.on('bounds-changed', (event, bounds) => {
window.electronAPI.onBoundsChanged((event, bounds) => {
const manageWindowReply = document.getElementById('manage-window-reply')
const message = `Size: ${bounds.size} Position: ${bounds.position}`
manageWindowReply.textContent = message
})
manageWindowBtn.addEventListener('click', (event) => {
ipcRenderer.send('create-demo-window')
window.electronAPI.createDemoWindow()
})