Browserwindow electron api12/29/2022 ![]() ![]() You can take advantage of all the customization available when creating a. Window.loadFile('login.html') // For testing purposes onlyĮlectronApp. Electron pairs this native Chrome Window with a BrowserWindow under the hood. new BrowserWindow ( options) options Object width Integer - Window's width in pixels. Fossies Dox: electron-20.3.0.tar. It creates a new BrowserWindow with native properties as set by the options. About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS. Class: BrowserWindow BrowserWindow is an EventEmitter. Preload: nodePath.join(_dirname, 'preload.js') You can also create a window without chrome by using Frameless Window API. This option should be used when loading potentially untrusted remote content to ensure the loaded content cannot tamper with the preload script and any Electron APIs being used. Main.js (main thread) const electronApp = require('electron').app Ĭonst electronBrowserWindow = require('electron').BrowserWindow Ĭonst electronIpcMain = require('electron').ipcMain The Electron API will only be available in the preload script and not the loaded page. ![]() Moving between window sources, whether it be local (file) or remote (URL) can be accomplished by just calling window.loadFile(.) or window.loadURL(.), but only after the instance of the window has been created. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |