<< return Browser Window Options in Electron application
There are many options when creating a BrowserWindow instance. Here are some of the most common and useful ones:
- Dimensions and Appearance:
- • width: Width of the window in pixels.
- • height: Height of the window in pixels.
- • minWidth: Minimum width.
- • minHeight: Minimum height.
- • maxWidth: Maximum width.
- • maxHeight: Maximum height.
- • x: Horizontal position of the window.
- • y: Vertical position of the window.
- • resizable: Whether the window can be resized (default: true).
- • movable: Whether the window can be moved (default: true).
- • minimizable: Whether the window can be minimized (default: true).
- • maximizable: Whether the window can be maximized (default: true).
- • closable: Whether the window can be closed (default: true).
- • alwaysOnTop: Whether the window should always stay on top of other windows.
- • fullscreen: Start the window in fullscreen mode.
- • fullscreenable: Whether the window can enter fullscreen mode (default: true).
- • skipTaskbar: Whether to show the window in the taskbar.
- • frame: Whether to include the window frame (default: true). Set to false for a frameless window.
- • titleBarStyle: Style of the title bar ('default', 'hidden', 'hiddenInset', 'customButtonsOnHover').
- • transparent: Makes the window background transparent.
- • icon: Path to the window's icon file.
- • backgroundColor: Background color of the window (e.g., '#fff' or 'rgb(255, 255, 255)').
- Web Content Control, webPreferences: An object containing further options related to the web page loaded in the window
- • preload: Path to a preload script. This script runs in a separate context before the renderer process starts and has access to both Node.js and browser APIs. Crucial for secure communication between main and renderer.
- • nodeIntegration: Enables Node.js integration in the renderer process (use with caution due to security implications, prefer preload scripts).
- • contextIsolation: Isolates the renderer's JavaScript context (recommended for security).
- • sandbox: Runs the renderer process in a sandboxed environment, further increasing security.
- • devTools: Whether to enable DevTools (default: true).
- • partition: Use a custom storage partition.
- • zoomFactor: Default zoom level.
- • javascript: Whether to enable JavaScript execution (usually leave as true).
- Other:
- • show: Whether to show the window immediately after creation (default: true). It's often better to show the window after the 'ready-to-show' event to avoid flickering.
- • parent: Makes the current window a child of another BrowserWindow instance.
- • modal: Creates a modal window (requires a parent window).
- • hasShadow: Whether the window has a shadow.
Electron context:
- (2024) Electron video player with cashing and CSP policy #Electron #Video
- (2024) My workable project template for Angular Electron #Angular #Electron
- (2024) Node PostProcessor step for Angular and Electron. #Angular #Electron #NodeBackend
- (2022) Electron learning #FrontLearning #Electron
- ...
- (2024) Browser Window Options in Electron application.
- (2024) Important Parameters in Electron application.
- (2024) Core Features and Concepts in Electron application.
- (2024) Crucial Programming Techniques in Electron application.
- (2024) Main Process vs. Renderer Process in Electron application.
- (2024) Inter-Process Communication in Electron application.
- (2024) Asynchronous Operations in Electron application.
- (2024) Databases in Electron application.
- (2024) MySQL and PostgreSQL integration in Electron application.
- (2024) LocalStorage in Electron application.
- (2024) Native Modules in Electron application.
- (2024) Electron APIs in Electron application.
- (2024) Multi-window Applications in Electron application.
- (2024) Packaging and Distribution in Electron application.
- (2024) Node Integration in Electron application.
- (2024) Memory Leaks in Electron application.
- (2024) Code Security in Electron application.
- (2024) Browser Automation in Electron application.
- (2024) Testing in Electron application.
- (2024) Monetization in Electron application.
AngularElectron context:
Front context:
- (2025) My new project with WebRTC, what is WebRTC? #Android #Front
- (2024) Encapsulate HTML, CSS, and JS to WebComponent. Shadow DOM. Example of my WebComponent in this blog. #Front
- (2024) My lecture about Javascript (Ukrainian language). #Front
- (2019) Inject OnBegin/OnSuccess/OnFailure custom Javascript code into ASP.NET Ajax tag by Bundle of jquery.unobtrusive-ajax.min.js #Front #JavascriptProjects
- (2017) My site with peer-to-peer communication based on Mizu-Voip library. #Front #Css #Voip
- (2017) My solution with Bootstrap modal window and Classic ASP.NET. #AspNetClassic #Front #Css
- (2016) SPA-page на Classic ASP.NET та jQuery. #Front #AspNetClassic
- (2015) Cropper світлин сайту. #Front #AspNetMvc #Css
- (2015) Перемикач мови для сайту. #Front #AspNetMvc
- (2012) Календарики (datapicker), применяемые мною на jQuery / MS AJAX / JavaScript / Flex / MONO. #Front
- (2012) Заполнение связанных списков на MS AJAX и jQuery. #Front #AspNetClassic
- (2012) Применение jQuery-UI-dialog в ASP.NET #Front #AspNetClassic
- (2011) Как с помощью jQuery сделать флеш-ролик резиновым #Front #Flex
- (2011) AJAX подсказка/автозаполнение на jQuery #Front
- (2010) Flex, Java, Angular, Android. #SectionFront
- (2009) Язва-скрипт в ASP.NET. #Front
- (2009) Счетчики на Web-страничках. #AspNetClassic #Front
Comments (
)

Link to this page:
http://www.vb-net.com/AngularElectron/BrowserWindowOptions.htm
|