"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/fiddles/windows/manage-windows/frameless-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 { ipcRenderer } = require('electron')
const shell = require('electron').shell
const framelessWindowBtn = document.getElementById('frameless-window') const newWindowBtn = document.getElementById('frameless-window')
const links = document.querySelectorAll('a[href]') newWindowBtn.addEventListener('click', () => {
const url = 'data:text/html,<h2>Hello World!</h2><a id="close" href="javascrip
framelessWindowBtn.addEventListener('click', (event) => { t:window.close()">Close this Window</a>'
const modalPath = 'https://electronjs.org' ipcRenderer.send('create-frameless-window', { url })
let win = new BrowserWindow({ frame: false })
win.on('close', () => { win = null })
win.loadURL(modalPath)
win.show()
})
Array.prototype.forEach.call(links, (link) => {
const url = link.getAttribute('href')
if (url.indexOf('http') === 0) {
link.addEventListener('click', (e) => {
e.preventDefault()
shell.openExternal(url)
})
}
}) })
 End of changes. 3 change blocks. 
22 lines changed or deleted 6 lines changed or added

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