preload string (任意) - 他のスクリプトがページで実行される前にロードされるスクリプトを指定します。 このスクリプトは、Node統合がオンまたはオフであるかに関係なく常にNode APIにアクセスできます。 値は、スクリプトへの絶対ファイルパスにする必要があります。 Node統合がオフのときでも、プレロードされたスクリプトは、Nodeのグローバルシンボルをグローバルスコープに再導入できます。 See example here.
sandbox boolean (任意) - 設定された場合、ウインドウと関連付けられているレンダラーをサンドボックス化します。これは、ChromiumのOSレベルのサンドボックスと互換性を持ち、Node.jsエンジンを無効化します。 これは nodeIntegration オプションと同じではなく、プレロードスクリプトで利用可能なAPIよりもさらに制限がかかります。 Default is true since Electron 20. The sandbox will automatically be disabled when nodeIntegration is set to true. Read more about the option here.
sessionSession (optional) - Sets the session used by the page. Session オブジェクトを直接引き渡す代わりに、パーティション文字列を受け付ける partition オプションを使用することを選択することもできます。 session と partition の両方が指定されたときは、session が優先されます。 省略値は、既定のセッションです。
backgroundThrottling boolean (任意) - ページがバックグラウンドになったとき、アニメーションやタイマーを抑制するかどうか。 This also affects the Page Visibility API. 少なくとも 1 つの webContents が 1 つの browserWindow に表示されていて、そのウインドウの backgroundThrottling が無効になっている場合、ウインドウ全体とウインドウによって表示される他の webContents に対して、フレームが描画されて交換されます。 省略値は true です。
offscreen Object | boolean (optional) - Whether to enable offscreen rendering for the browser window. 省略値は false です。 See the offscreen rendering tutorial for more details.
useSharedTexture boolean (optional) Experimental - Whether to use GPU shared texture for accelerated paint event. 省略値は false です。 See the offscreen rendering tutorial for more details.
sharedTexturePixelFormat string (optional) Experimental - The requested output format of the shared texture. 省略値は argb です。 The name is originated from Chromium media::VideoPixelFormat enum suffix and only subset of them are supported. The actual output pixel format and color space of the texture should refer to OffscreenSharedTexture object in the paint event.
argb - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
rgbaf16 - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
contextIsolation boolean (任意) - Electron APIと指定された preload スクリプトを別々のJavaScriptコンテキストで実行するかどうか。 省略値は true です。 preload スクリプトが実行されるコンテキストでは、専用の document および window グローバルと、独自の JavaScript ビルドインのセット (Array, Object, JSON など) にのみアクセスできます。これらすべてはロードされたコンテンツからは見えません。 Electron API は preload スクリプトでのみ利用可能で、読み込まれたページでは利用できません。 このオプションは、信頼できない可能性のあるリモートコンテンツをロードする際に使用します。ロードされたコンテンツが preload スクリプトや使用する Electron API を改ざんできないようにするためです。 このオプションは、Chrome のコンテンツスクリプト のものと同じ技術を使用しています。 Console タブの一番上のコンボボックスの中にある 'Electron Isolated Context' という項目を選択することによって、開発者ツールでこのコンテキストにアクセスできます。
webviewTag boolean (optional) - Whether to enable the <webview> tag. 省略値は false です。 注:<webview> に設定された preload スクリプトは、実行時にNode統合が有効になるので、潜在的に悪意のある preload スクリプトを含む <webview> タグをリモート/信頼できないコンテンツに作成させないようにする必要があります。 You can use the will-attach-webview event on webContents to strip away the preload script and to validate or alter the <webview>'s initial settings.