title: Electron Remote Javascript injection problem
body: <pre><code>   const BrowserWindow = remote.BrowserWindow;
  
     const IGWin = new BrowserWindow({
         show: false,
         webPreferences: {
             plugins: true,
             allowDisplayingInsecureContent: true
         },
  
     });
  
  
     IGWin.loadURL('https://instagram.com');
     IGWin.once('ready-to-show', () =&gt; {
         IGWin.show();
         IGWin.title = &quot;TEST&quot;;
  
         IGWin.webContents.on('did-finish-load', function() {
             setTimeout(function () {
                 IGWin.webContents.executeJavaScript(&quot;$('input[name=username]').value = 1&quot;);
             }, 1100)
  
         });
  
  
  
     })
  </code></pre>
  <p>I get this error: <a href="https://i.imgur.com/7mKreo4.png" rel="nofollow noreferrer">https://i.imgur.com/7mKreo4.png</a></p>
  <p>I have tried changing ' to &quot; and &quot; to &quot; and &quot; to `` and nothing worked, i don't know what cause this problem and i hope someone will let me know what to change in code because i already spent like 1 hour and i can't find solution. I will really appreciate if someone will solve this for me.</p>