title: how to use google.script.run as if it was a function
body: <p>In a Google Apps Script, I have the following script:</p>
  
  <pre><code>function doGet() {
    return HtmlService.createHtmlOutputFromFile('mypage');
  }
  
  function writeSomething() {
    return "&lt;h1&gt;hi people&lt;/h1&gt;";
  }
  </code></pre>
  
  <p>and the following html file:</p>
  
  <pre><code>&lt;html&gt;
    &lt;a id="caller" href="#"&gt;update&lt;/a&gt;
    &lt;br&gt;
    &lt;div id="div"&gt;waiting...&lt;/div&gt;
  &lt;script&gt;
  function go() {
    var a=google.script.run.writeSomething();
    document.getElementById("div").innerHTML=a;
  }
  document.getElementById('caller').onclick = go;
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I click on the "update" link, the div content changes from "waiting..." to "undefined". I suppose that google.script.run cannot be called as a function.
  So, how can I solve this trouble? (obviously, this is a toy example; I need a way to update the div content from the script and not from the html file)</p>