BrowserWindowConstructorOptions Object extends BaseWindowConstructorOptions
webPreferencesWebPreferences (opcional) - Configuración de las características de la página web.devToolsboolean (opcional) - Si se habilita el DevTools. Si se configura afalse, no puede utilizarseBrowserWindow.webContents.openDevTools()para abrir DevTools. Por defecto estrue.nodeIntegrationboolean (optional) - Whether node integration is enabled. Por defecto esfalse.nodeIntegrationInWorkerboolean (opcional) - Si la integración de nodos está habilitada en los trabajadores de la web. Por defecto esfalse. More about this can be found in Multithreading.nodeIntegrationInSubFramesboolean (opcional) - Opcion experimental para habilitar soporte Node.js en sub-frames como iframes y ventas hijos. Todos tus preloads cargarán por cada iframe, puedes usarprocess.isMainFramepara determinar si estás en el marco principal o no.preloadstring (opcional) - Especifica un script que será cargado antes del otros scripts en la página. Este script siempre tendrá acceso al nodo APIs sin importar si la integración de nodos esté activada o no. El valor debería ser la ruta del archivo absoluto al script. Cuando la integración de nodos esta desactivada, la precarga del script puede reintroducir de vuelta al ámbito global los símbolos globales del Nodo. See example here.sandboxboolean (opcional) - Si se configura, protegerá al renderizador asociado a la ventana, haciéndolo compatible con el sandbox de Chromium OS-level, deshabilitando el motor Node.js. Esto no es lo mismo que la opción denodeIntegrationy las APIs disponibles para el script de precarga son más limitadas. Default istruesince Electron 20. The sandbox will automatically be disabled whennodeIntegrationis set totrue. Read more about the option here.sessionSession (optional) - Sets the session used by the page. En lugar de pasar directamente el objeto de la sesión, se puede optar por utilizar la opción departition, la cual acepta una cadena de partición. Cuando se proporcionensessionypartition, se preferirásession. Default es la sesión por defecto.partitioncadena (opcional) - Configura la sesión utilizada por la página según la cadena de partición de la sesión. Si lapartitionempieza conpersist:, la página utilizará una sesión persistente disponible para todas las páginas en la partición con la mismapartition. Si no está el prefijopersist:, la página usara una sesión de la memoria interna. Al asignar la mismapartition, las páginas múltiples pueden compartir la misma sesión. Default es la sesión por defecto.zoomFactornumber (optional) - The default zoom factor of the page,3.0represents300%. Por defecto es1.0.javascriptboolean (optional) - Enables JavaScript support. Por defecto estrue.webSecurityboolean (opcional) - Cuando esfalse, desactivará la política de same-origin (por lo general se utiliza cuando la gente prueba los sitios web), y configuraráallowRunningInsecureContentatrueen caso de que estas opciones no hayan sido configuradas por el usuario. Por defecto estrue.allowRunningInsecureContentboolean (optional) - Allow an https page to run JavaScript, CSS or plugins from http URLs. Por defecto esfalse.imagesboolean (optional) - Enables image support. Por defecto estrue.imageAnimationPolicystring (opcional) - Especifica cómo correr la animaciones de la imagen (P.e. GIFs). Puede seranimate,animateOnceonoAnimation. Por defecto esanimate.textAreasAreResizableboolean (optional) - Make TextArea elements resizable. Default istrue.webglboolean (optional) - Enables WebGL support. Por defecto estrue.pluginsboolean (optional) - Whether plugins should be enabled. Por defecto esfalse.experimentalFeaturesboolean (optional) - Enables Chromium's experimental features. Por defecto esfalse.scrollBounceboolean (optional) macOS - Enables scroll bounce (rubber banding) effect on macOS. Por defecto esfalse.enableBlinkFeaturesstring (opcional) - Una lista de cadenas de características separadas por,, para habilitar comoCSSVariables,KeyboardEventKey. La lista completa de cadenas distintivas soportadas pueden encontrarse en el archivo RuntimeEnabledFeatures.json5.disableblinkFeaturesstring (opcional) - Una lista de cadenas distintivas separadas por,,comoCSSVariables,KeyboardEventKeypara deshabilitar. La lista completa de cadenas características soportadas puede ser encontrada en el archivo RuntimeEnabledFeatures.json5.defaultFontFamilyObject (optional) - Sets the default font for the font-family.standardstring (opcional) - Por defecto esTimes New Roman.serifstring (opcional) - Por defecto esTimes New Roman.sansSerifstring (opcional) - Por defecto esArial.monospacestring (opcional) - Por defecto esCourier New.cursivestring (opcional) - Por defecto esScript.fantasystring (opcional) - Por defecto esImpact.mathstring (opcional) - Por defecto esLatin Modern Math.
defaultFontSizeInteger (opcional) - Por defecto es16.defaultMonospaceFontSizeInteger (opcional) - Por defecto es13.minimumFontSizeInteger (opcional) - Por defecto es0.defaultEncodingstring (opcional) - Por defecto esISO-8859-1.backgroundThrottlingboolean (opcional) - Para acelerar animaciones y temporizadores cuando la página esta al fondo. This also affects the Page Visibility API. When at least one webContents displayed in a single browserWindow has disabledbackgroundThrottlingthen frames will be drawn and swapped for the whole window and other webContents displayed by it. Por defecto estrue.offscreenObject | boolean (optional) - Whether to enable offscreen rendering for the browser window. Por defecto esfalse. See the offscreen rendering tutorial for more details.useSharedTextureboolean (optional) Experimental - Whether to use GPU shared texture for accelerated paint event. Por defecto esfalse. See the offscreen rendering tutorial for more details.
contextIsolationboolean(opcional) - Para ejecutar las APIs de Electron y el script especificadopreloaden un contexto JavaScript independiente. Por defecto estrue. The context that thepreloadscript runs in will only have access to its own dedicateddocumentandwindowglobals, as well as its own set of JavaScript builtins (Array,Object,JSON, etc.), which are all invisible to the loaded content. The Electron API will only be available in thepreloadscript and not the loaded page. This option should be used when loading potentially untrusted remote content to ensure the loaded content cannot tamper with thepreloadscript and any Electron APIs being used. Esta opción utiliza la misa técnica usada por Chrome Content Scripts. You can access this context in the dev tools by selecting the 'Electron Isolated Context' entry in the combo box at the top of the Console tab.webviewTagboolean (optional) - Whether to enable the<webview>tag. Por defecto esfalse. Nota: El scriptpreloadconfigurado para el<webview>tendrá la integración de nodos habilitada cuando se ejecuta por lo que hay que asegurarse que el contenido remoto o posiblemente dañino no sea capaz de crear una etiqueta de<webview>con un scriptpreloadposiblemente malicioso. You can use thewill-attach-webviewevent on webContents to strip away thepreloadscript and to validate or alter the<webview>'s initial settings.additionalArgumentsstring[] (optional) - A list of strings that will be appended toprocess.argvin the renderer process of this app. Useful for passing small bits of data down to renderer process preload scripts.safeDialogsboolean (optional) - Whether to enable browser style consecutive dialog protection. Por defecto esfalse.safeDialogsMessagestring (opcional) - El mensaje a mostrar cuando la protección de diálogo consecutivo es lanzada. So no se define el mensaje por defecto sería utilizado, note que actualmente el mensaje por defecto esta en Inglés y no localizado.disableDialogsboolean (optional) - Whether to disable dialogs completely. OverridessafeDialogs. Por defecto esfalse.navigateOnDragDropboolean (optional) - Whether dragging and dropping a file or link onto the page causes a navigation. Por defecto esfalse.autoplayPolicystring (opcional) - Política de autoplay para aplicar al contenido en la ventana, puede serno-user-gesture-required,user-gesture-required,document-user-activation-required. Por defecto ano-user-gesture-required.disableHtmlFullscreenWindowResizeboolean (optional) - Whether to prevent the window from resizing when entering HTML Fullscreen. Default isfalse.accessibleTitlestring (optional) - An alternative title string provided only to accessibility tools such as screen readers. Esta cadena no es directamente visible para los usuarios.spellcheckboolean (optional) - Whether to enable the builtin spellchecker. Por defecto estrue.enableWebSQLboolean (optional) - Whether to enable the WebSQL api. Por defecto estrue.v8CacheOptionsstring (optional) - Enforces the v8 code caching policy used by blink. Accepted values arenone- Disables code cachingcode- Heuristic based code cachingbypassHeatCheck- Bypass code caching heuristics but with lazy compilationbypassHeatCheckAndEagerCompile- Same as above except compilation is eager. Default policy iscode.
enablePreferredSizeModeboolean (optional) - Whether to enable preferred size mode. The preferred size is the minimum size needed to contain the layout of the document—without requiring scrolling. Enabling this will cause thepreferred-size-changedevent to be emitted on theWebContentswhen the preferred size changes. Por defecto esfalse.transparentboolean (optional) - Whether to enable background transparency for the guest page. Por defecto estrue. Note: The guest page's text and background colors are derived from the color scheme of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.enableDeprecatedPasteboolean (optional) Deprecated - Whether to enable thepasteexecCommand. Por defecto esfalse.
paintWhenInitiallyHiddenboolean (opcional) - Si el renderer debería estar activo cuandoshowesfalsey recién ha sido creado. Para quedocument.visibilityStatefuncione correctamente en la primera carga conshow: falsedebería establecer esto afalse. Estableciendo esto afalsecausará que el eventoready-to-showno se dispare. Por defecto estrue.