"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/fiddles/windows/manage-windows/new-window/renderer.js" between
electron-11.2.3.tar.gz and electron-11.3.0.tar.gz

About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS.

renderer.js  (electron-11.2.3):renderer.js  (electron-11.3.0)
const { BrowserWindow } = require('electron').remote const { shell, ipcRenderer } = require('electron')
const { shell } = require('electron').remote
const newWindowBtn = document.getElementById('new-window') const newWindowBtn = document.getElementById('new-window')
const link = document.getElementById('browser-window-link') const link = document.getElementById('browser-window-link')
newWindowBtn.addEventListener('click', (event) => { newWindowBtn.addEventListener('click', (event) => {
const url = 'https://electronjs.org'
let win = new BrowserWindow({ width: 400, height: 320 }) ipcRenderer.send('new-window', { url, width: 400, height: 320 });
win.on('close', () => { win = null })
win.loadURL('https://electronjs.org')
win.show()
}) })
link.addEventListener('click', (e) => { link.addEventListener('click', (e) => {
e.preventDefault() e.preventDefault()
shell.openExternal("https://electronjs.org/docs/api/browser-window") shell.openExternal("https://electronjs.org/docs/api/browser-window")
}) })
 End of changes. 2 change blocks. 
8 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)