BrowserWindowConstructorOptions Object extends BaseWindowConstructorOptions
webPreferences
WebPreferences (opcional) - Configuración de las características de la página web.devTools
boolean (opcional) - Si se habilita el DevTools. Si se configura afalse
, no puede utilizarseBrowserWindow.webContents.openDevTools()
para abrir DevTools. Por defecto estrue
.nodeIntegration
boolean (optional) - Whether node integration is enabled. Por defecto esfalse
.nodeIntegrationInWorker
boolean (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.nodeIntegrationInSubFrames
boolean (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.isMainFrame
para determinar si estás en el marco principal o no.preload
string (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.sandbox
boolean (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 denodeIntegration
y las APIs disponibles para el script de precarga son más limitadas. Read more about the option here.session
Session (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 proporcionensession
ypartition
, se preferirásession
. Default es la sesión por defecto.partition
cadena (opcional) - Configura la sesión utilizada por la página según la cadena de partición de la sesión. Si lapartition
empieza 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.zoomFactor
number (optional) - The default zoom factor of the page,3.0
represents300%
. Por defecto es1.0
.javascript
boolean (optional) - Enables JavaScript support. Por defecto estrue
.webSecurity
boolean (opcional) - Cuando esfalse
, desactivará la política de same-origin (por lo general se utiliza cuando la gente prueba los sitios web), y configuraráallowRunningInsecureContent
atrue
en caso de que estas opciones no hayan sido configuradas por el usuario. Por defecto estrue
.allowRunningInsecureContent
boolean (optional) - Allow an https page to run JavaScript, CSS or plugins from http URLs. Por defecto esfalse
.images
boolean (optional) - Enables image support. Por defecto estrue
.imageAnimationPolicy
string (opcional) - Especifica cómo correr la animaciones de la imagen (P.e. GIFs). Puede seranimate
,animateOnce
onoAnimation
. Por defecto esanimate
.textAreasAreResizable
boolean (optional) - Make TextArea elements resizable. Default istrue
.webgl
boolean (optional) - Enables WebGL support. Por defecto estrue
.plugins
boolean (optional) - Whether plugins should be enabled. Por defecto esfalse
.experimentalFeatures
boolean (optional) - Enables Chromium's experimental features. Por defecto esfalse
.scrollBounce
boolean (optional) macOS - Enables scroll bounce (rubber banding) effect on macOS. Por defecto esfalse
.enableBlinkFeatures
string (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.disableblinkFeatures
string (opcional) - Una lista de cadenas distintivas separadas por,
,comoCSSVariables,KeyboardEventKey
para deshabilitar. La lista completa de cadenas características soportadas puede ser encontrada en el archivo RuntimeEnabledFeatures.json5.defaultFontFamily
Object (optional) - Sets the default font for the font-family.standard
string (opcional) - Por defecto esTimes New Roman
.serif
string (opcional) - Por defecto esTimes New Roman
.sansSerif
string (opcional) - Por defecto esArial
.monospace
string (opcional) - Por defecto esCourier New
.cursive
string (opcional) - Por defecto esScript
.fantasy
string (opcional) - Por defecto esImpact
.math
string (opcional) - Por defecto esLatin Modern Math
.
defaultFontSize
Integer (opcional) - Por defecto es16
.defaultMonospaceFontSize
Integer (opcional) - Por defecto es13
.minimumFontSize
Integer (opcional) - Por defecto es0
.defaultEncoding
string (opcional) - Por defecto esISO-8859-1
.backgroundThrottling
boolean (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 disabledbackgroundThrottling
then frames will be drawn and swapped for the whole window and other webContents displayed by it. Por defecto estrue
.offscreen
Object | boolean (optional) - Whether to enable offscreen rendering for the browser window. Por defecto esfalse
. See the offscreen rendering tutorial for more details.useSharedTexture
boolean (optional) Experimental - Whether to use GPU shared texture for accelerated paint event. Por defecto esfalse
. See the offscreen rendering tutorial for more details.
contextIsolation
boolean(opcional) - Para ejecutar las APIs de Electron y el script especificadopreload
en un contexto JavaScript independiente. Por defecto estrue
. The context that thepreload
script runs in will only have access to its own dedicateddocument
andwindow
globals, 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 thepreload
script and not the loaded page. This option should be used when loading potentially untrusted remote content to ensure the loaded content cannot tamper with thepreload
script 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.webviewTag
boolean (optional) - Whether to enable the<webview>
tag. Por defecto esfalse
. Nota: El scriptpreload
configurado 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 scriptpreload
posiblemente malicioso. You can use thewill-attach-webview
event on webContents to strip away thepreload
script and to validate or alter the<webview>
's initial settings.additionalArguments
string[] (optional) - A list of strings that will be appended toprocess.argv
in the renderer process of this app. Useful for passing small bits of data down to renderer process preload scripts.safeDialogs
boolean (optional) - Whether to enable browser style consecutive dialog protection. Por defecto esfalse
.safeDialogsMessage
string (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.disableDialogs
boolean (optional) - Whether to disable dialogs completely. OverridessafeDialogs
. Por defecto esfalse
.navigateOnDragDrop
boolean (optional) - Whether dragging and dropping a file or link onto the page causes a navigation. Por defecto esfalse
.autoplayPolicy
string (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
.disableHtmlFullscreenWindowResize
boolean (optional) - Whether to prevent the window from resizing when entering HTML Fullscreen. Default isfalse
.accessibleTitle
string (optional) - An alternative title string provided only to accessibility tools such as screen readers. Esta cadena no es directamente visible para los usuarios.spellcheck
boolean (optional) - Whether to enable the builtin spellchecker. Por defecto estrue
.enableWebSQL
boolean (optional) - Whether to enable the WebSQL api. Por defecto estrue
.v8CacheOptions
string (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
.
enablePreferredSizeMode
boolean (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-changed
event to be emitted on theWebContents
when the preferred size changes. Por defecto esfalse
.transparent
boolean (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.
paintWhenInitiallyHidden
boolean (opcional) - Si el renderer debería estar activo cuandoshow
esfalse
y recién ha sido creado. Para quedocument.visibilityState
funcione correctamente en la primera carga conshow: false
debería establecer esto afalse
. Estableciendo esto afalse
causará que el eventoready-to-show
no se dispare. Por defecto estrue
.