electron/docs/fiddles/windows/manage-windows/frameless-window/renderer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
289 B
JavaScript
Raw Normal View History

const newWindowBtn = document.getElementById('frameless-window')
2020-08-27 14:31:51 +00:00
newWindowBtn.addEventListener('click', () => {
const url = 'data:text/html,<h2>Hello World!</h2><a id="close" href="javascript:window.close()">Close this Window</a>'
window.electronAPI.createFramelessWindow({ url })
2020-08-27 14:31:51 +00:00
})