title: Cookie value is Null in javascript and electron
body: <p>Hello i`m beginner in html.
  You can see the cookies in the get function.
  However, when called by another method, the cookie value does not exist.</p>
  
  <pre><code>exports.get = function getCookie(name) { 
    var value = {
        name: name
    };
    ses.cookies.get(value, function(error, cookies) {
      if (name == "service") {
        alert((cookies[0].value) +"1" ) //alert is normal
        return (cookies[0].value).toString()
      }
    })}
  
  --------------------another file --------------------
   alert(cookie.get('service')); // this alert is abnormal
  </code></pre>
  
  <p>What should I do normally print cookies from other files?</p>