<p dir="auto">It could be useful to be able to intercept dialog events from webview (alert, confirm, prompt) to be able to implement our own gui.</p>
<p dir="auto">Also it is part of chrome webview events<br>
<a href="https://developer.chrome.com/apps/tags/webview#event-dialog" rel="nofollow">https://developer.chrome.com/apps/tags/webview#event-dialog</a></p>
<ul dir="auto">
<li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: v3.0.8</li>
<li>Operating System (Platform and Version): Ubuntu 18.0.4</li>
</ul>
<p dir="auto">When running electron like:</p>
<p dir="auto">npx electron web/spectron/example/index.js the appPath (via app.getAppPath()) ends up becoming broken and just:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/path/to/myproject/node_modules/electron/dist/resources/default_app.asar"><pre class="notranslate"><code class="notranslate">/home/path/to/myproject/node_modules/electron/dist/resources/default_app.asar
</code></pre></div>
<p dir="auto">... this is wrong.</p>
<p dir="auto">Note that if I just do <code class="notranslate">npx electron .</code> the value is right and is:</p>
<p dir="auto">/home/path/to/myproject</p>
<p dir="auto">... and if I bundle my app as a real APP with .asar packaging I get:</p>
<p dir="auto">/opt/Polar Bookshelf/resources/app.asar</p>
<p dir="auto">The problem is that this breaks my spectron tests as I can't find a reliable path to require() my entry point.</p>