<ul dir="auto">
<li>Electron version: 1.2.0</li>
<li>Operating system: Mac OS</li>
</ul>
<p dir="auto">With electron 1.0.1, I'm able to use the following code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    // requests to 'itch-internal' are used to communicate between web content &amp; the app
    let internalFilter = {
      urls: ['https://itch-internal/*']
    }

    session.webRequest.onBeforeRequest(internalFilter, (details, callback) =&gt; {
      callback({cancel: true})
    })"><pre class="notranslate">    <span class="pl-c">// requests to 'itch-internal' are used to communicate between web content &amp; the app</span>
    <span class="pl-k">let</span> <span class="pl-s1">internalFilter</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
      <span class="pl-c1">urls</span>: <span class="pl-kos">[</span><span class="pl-s">'https://itch-internal/*'</span><span class="pl-kos">]</span>
    <span class="pl-kos">}</span>

    <span class="pl-s1">session</span><span class="pl-kos">.</span><span class="pl-c1">webRequest</span><span class="pl-kos">.</span><span class="pl-en">onBeforeRequest</span><span class="pl-kos">(</span><span class="pl-s1">internalFilter</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">details</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
      <span class="pl-s1">callback</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">cancel</span>: <span class="pl-c1">true</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">but on 1.2.0, the callback is never called. Did the filter syntax change? Or did the functionality broke with a Chrome update?</p>
<ul dir="auto">
<li>Electron version: 1.2.0</li>
<li>Operating system: OS X 10.11.5</li>
</ul>
<p dir="auto">webview preload attribute seems to be broken in Electron 1.2.0/Chrome 51 (worked with 1.1.3/Chrome 50).</p>
<p dir="auto">Here is how I used it (successfully) on versions prior to 1.2.0:<br>
<code class="notranslate">@webview.preload = "file://#{app.getAppPath()}/js/player-preload.js"</code></p>
<p dir="auto">Tried to put it in the HTML webview tag directly as attribute, same thing.</p>
<p dir="auto">Note: No error in the Console though, it's just that the script is never actually executed.</p>