<p dir="auto">To connect with Trello API, this is done in a popup after filling access, I have a blank page ...<br>
Could you help me ?</p>
<p dir="auto">Thank you !</p>
<p dir="auto">You try connect with this access :<br>
login : <a href="mailto:jerryxilimm-9589@yopmail.com">jerryxilimm-9589@yopmail.com</a><br>
password : jerryxilimm-9589</p>
<p dir="auto">My code test :</p>
<p dir="auto">Package.json :</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;name&quot;    : &quot;NQ trello&quot;,
  &quot;version&quot; : &quot;0.1.0&quot;,
  &quot;main&quot;    : &quot;main.js&quot;
}"><pre class="notranslate">{
  <span class="pl-ent">"name"</span>    : <span class="pl-s"><span class="pl-pds">"</span>NQ trello<span class="pl-pds">"</span></span>,
  <span class="pl-ent">"version"</span> : <span class="pl-s"><span class="pl-pds">"</span>0.1.0<span class="pl-pds">"</span></span>,
  <span class="pl-ent">"main"</span>    : <span class="pl-s"><span class="pl-pds">"</span>main.js<span class="pl-pds">"</span></span>
}</pre></div>
<p dir="auto">Main.js :</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');
require('crash-reporter').start();

var mainWindow = null;


app.on('window-all-closed', function() {
  if (process.platform != 'darwin')
    app.quit();
});


app.on('ready', function() {

  mainWindow = new BrowserWindow({
    width: 800, 
    height: 600,
    'node-integration': false
  });

  mainWindow.loadUrl('file://' + __dirname + '/index.html');

  mainWindow.on('closed', function() {
    mainWindow = null;
  });
});"><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-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-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crash-reporter'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">start</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</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">'window-all-closed'</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">platform</span> <span class="pl-c1">!=</span> <span class="pl-s">'darwin'</span><span class="pl-kos">)</span>
    <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">quit</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>


<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">mainWindow</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">width</span>: <span class="pl-c1">800</span><span class="pl-kos">,</span> 
    <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">,</span>
    <span class="pl-s">'node-integration'</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">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadUrl</span><span class="pl-kos">(</span><span class="pl-s">'file://'</span> <span class="pl-c1">+</span> <span class="pl-s1">__dirname</span> <span class="pl-c1">+</span> <span class="pl-s">'/index.html'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'closed'</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">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</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><span class="pl-kos">;</span></pre></div>
<p dir="auto">Index.html :</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0&quot; /&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no, maximum-scale=1&quot; media=&quot;(device-height: 568px)&quot; 
    &lt;title&gt;Test&lt;/title&gt;


    &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.jquery.com/jquery-2.1.4.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;https://api.trello.com/1/client.js?key=6c3067ffd2a5feda29e39e1c8df9e3a8&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        $(document).ready(function () {
            $('#login').click(function(ev){
                Trello.authorize({
                    type: 'popup', 
                    response_type: 'token', 
                    name: 'TEST',
                    expiration: '30days', 
                    interactive: true,
                    success: function (data){
                        alert('Connexion OK');
                    },
                    error: function () {
                        alert('Connexion KO');
                    }
                });

                ev.preventDefault();
            });


            function getMe(){
                Trello.get('members/me', {}, function (data){
                    alert(JSON.stringify(data));
                }, function (){
                    alert('Don\'t retrieve information about me....')
                });
            }
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body ontouchstart=&quot;&quot;&gt;
    &lt;div id=&quot;app&quot;&gt;
        &lt;a href=&quot;#&quot; id=&quot;login&quot;&gt;LOGIN&lt;/a&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;"><pre class="notranslate"><span class="pl-c1">&lt;!DOCTYPE html<span class="pl-kos">&gt;</span></span>
<span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">charset</span>="<span class="pl-s">utf-8</span>" /&gt;
    <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">name</span>="<span class="pl-s">viewport</span>" <span class="pl-c1">content</span>="<span class="pl-s">width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0</span>" /&gt;
    <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">name</span>="<span class="pl-s">viewport</span>" <span class="pl-c1">content</span>="<span class="pl-s">initial-scale=1.0, user-scalable=no, maximum-scale=1</span>" <span class="pl-c1">media</span>="<span class="pl-s">(device-height: 568px)</span>"<span class="pl-kos"></span> 
    <span class="pl-kos">&lt;</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span>Test<span class="pl-kos">&lt;/</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span>


    <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://code.jquery.com/jquery-2.1.4.min.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://api.trello.com/1/client.js?key=6c3067ffd2a5feda29e39e1c8df9e3a8</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">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-en">$</span><span class="pl-kos">(</span><span class="pl-s">'#login'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">ev</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
                <span class="pl-v">Trello</span><span class="pl-kos">.</span><span class="pl-en">authorize</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
                    <span class="pl-c1">type</span>: <span class="pl-s">'popup'</span><span class="pl-kos">,</span> 
                    <span class="pl-c1">response_type</span>: <span class="pl-s">'token'</span><span class="pl-kos">,</span> 
                    <span class="pl-c1">name</span>: <span class="pl-s">'TEST'</span><span class="pl-kos">,</span>
                    <span class="pl-c1">expiration</span>: <span class="pl-s">'30days'</span><span class="pl-kos">,</span> 
                    <span class="pl-c1">interactive</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
                    <span class="pl-en">success</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
                        <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-s">'Connexion OK'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
                    <span class="pl-kos">}</span><span class="pl-kos">,</span>
                    <span class="pl-en">error</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-en">alert</span><span class="pl-kos">(</span><span class="pl-s">'Connexion KO'</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>

                <span class="pl-s1">ev</span><span class="pl-kos">.</span><span class="pl-en">preventDefault</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>


            <span class="pl-k">function</span> <span class="pl-en">getMe</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
                <span class="pl-v">Trello</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'members/me'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
                    <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">data</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-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
                    <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-s">'Don\'t retrieve information about me....'</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><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">body</span> <span class="pl-c1">ontouchstart</span>=""<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">id</span>="<span class="pl-s">app</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>" <span class="pl-c1">id</span>="<span class="pl-s">login</span>"<span class="pl-kos">&gt;</span>LOGIN<span class="pl-kos">&lt;/</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Browser-Window node-integration breaks after POST. require / global are undefined in browser-window after a POST request. I've seen this behavior since I first used Electron - 0.26.0. Still happens in 0.28.1. Here is simple way to reproduce:</p>
<p dir="auto">package.json</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
&quot;name&quot;: &quot;PostExample&quot;,
&quot;version&quot;: &quot;0.1.0&quot;,
&quot;main&quot;: &quot;main.js&quot;,
&quot;description&quot;: &quot;Post Loses Global&quot;
}   "><pre class="notranslate"><code class="notranslate">{
"name": "PostExample",
"version": "0.1.0",
"main": "main.js",
"description": "Post Loses Global"
}   
</code></pre></div>
<p dir="auto">main.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var app = require('app')
var BrowserWindow = require('browser-window')

var mainWindow = null;

app.on('window-all-closed', function() {
    app.quit()
});

app.on('ready', function() {

    mainWindow = new BrowserWindow({ 
        &quot;node-integration&quot;: true,
    });

    mainWindow.loadUrl('file://' + __dirname + '/index.html')

    mainWindow.openDevTools()

});"><pre class="notranslate"><code class="notranslate">var app = require('app')
var BrowserWindow = require('browser-window')

var mainWindow = null;

app.on('window-all-closed', function() {
    app.quit()
});

app.on('ready', function() {

    mainWindow = new BrowserWindow({ 
        "node-integration": true,
    });

    mainWindow.loadUrl('file://' + __dirname + '/index.html')

    mainWindow.openDevTools()

});
</code></pre></div>
<p dir="auto">index.html</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;html&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
    console.log(typeof global)
    try{
        var fs = require(&quot;fs&quot;);
    } catch(e){
        console.warn(&quot;ERROR&quot;, e)
    }
 &lt;/script&gt;
&lt;body&gt;
 &lt;h1&gt;Posts to self&lt;/h1&gt;
 &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
    &lt;input type=&quot;text&quot; name=&quot;somevar&quot; value=&quot;val&quot; /&gt;
    &lt;button type=&quot;submit&quot;&gt;Submit to see Error&lt;/button&gt;
 &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;"><pre class="notranslate"><code class="notranslate">&lt;html&gt;
 &lt;script type="text/javascript"&gt;
    console.log(typeof global)
    try{
        var fs = require("fs");
    } catch(e){
        console.warn("ERROR", e)
    }
 &lt;/script&gt;
&lt;body&gt;
 &lt;h1&gt;Posts to self&lt;/h1&gt;
 &lt;form action="" method="post"&gt;
    &lt;input type="text" name="somevar" value="val" /&gt;
    &lt;button type="submit"&gt;Submit to see Error&lt;/button&gt;
 &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre></div>