title: How to call a function/module in Electron from my webpage?
body: <p>I'll try to describe a minimized question in short paragraphs.</p>
  
  <p>In short, I want to use some logic or call some functions in my Electron App from the webpage that is <strong>in</strong> my Electron App (I am actually wrapping an electron app 'shell' for my webpage).</p>
  
  <p>Suppose I want to expose a function in my Electron app. Say,</p>
  
  <pre><code>function printNumbers () {
    console.log(1)
  }
  </code></pre>
  
  <p>notice that it should be located in my Electron code.</p>
  
  <p>Then after running my app, I'd like to call this function from my webpage(clicking a button in my webpage which is loaded from a website, then open a new window in my Electron App). For now, I think I can check whether printNumber works by using the developer console. </p>
  
  <p>I have checked how to use <code>remote</code> module to call functions/modules inside electron. But I didn't find a way to call a function I write in my electron code base. </p>
  
  <p>BTW:
  I can enable the <code>nodeIntegration</code> option.</p>