<p dir="auto">We have an Electron app which launches a new window containing a Flash application from the main window. We set <code class="notranslate">plugins</code> to <code class="notranslate">true</code> in the <code class="notranslate">BrowserWindow</code> options and away it goes. All good.</p>
<p dir="auto">However, the Flash app itself then launches another window containing a Flash component. The Flash component fails because it cannot find the Flash plugin.</p>
<p dir="auto">This child app works fine if we just launch it directly in a browser OR if we launch it directly from Electron with <code class="notranslate">plugins</code> set to <code class="notranslate">true</code>.</p>
<p dir="auto">Could Electron be modified to either:<br>
a) allow these child windows to inherit the options of the parent window, or...<br>
b) allow option defaults to be specified for these child windows</p>
<p dir="auto">or have I missed something and there's an easy way to currently do this?</p>
<p dir="auto">Thanks.</p>
<p dir="auto">If we initialize a browser window with <code class="notranslate">{ show: false }</code>, but the browser window runs JS code that opens a javascript window, then a new browser window will open, regardless of <code class="notranslate">{ show: false }</code></p>
<p dir="auto">Here's an example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var app = require('app')
var BrowserWindow = require('browser-window');

app.on('ready', function() {
  win = new BrowserWindow({ show: false });
  win.webContents.loadUrl('http://output.jsbin.com/cekonip/1');
  win.webContents.once('did-finish-load', function() {
    console.log('loaded!');
  })
})"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'app'</span><span class="pl-kos">)</span>
<span class="pl-k">var</span> <span class="pl-v">BrowserWindow</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'browser-window'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">win</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">show</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">win</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">loadUrl</span><span class="pl-kos">(</span><span class="pl-s">'http://output.jsbin.com/cekonip/1'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">win</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">once</span><span class="pl-kos">(</span><span class="pl-s">'did-finish-load'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'loaded!'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">The jsbin runs the following code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="window.open('http://google.com')"><pre class="notranslate"><span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s">'http://google.com'</span><span class="pl-kos">)</span></pre></div>