title: How to get text from iframe of Dialogflow Web Demo
body: <p>I'm trying to extract the server-response text from the in iframe of Dialog Web Demo</p>
  
  <p>Here's my code- Currently, the output is <code>null</code>:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=\"en\"&gt;
  &lt;head&gt;&lt;meta name=\"viewport\" content=\"width=device-width, initial- scale=1, user-scalable=no\"/&gt;
  &lt;title&gt;Dialog&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div align="center"&gt;
  &lt;iframe
      id="dialog"
      allow="microphone;"
      width="350"
      height="430"
      src="https://console.dialogflow.com/api-client/demo/embedded/xxxxxxxxxxxxxxxxxxxxxxxxxxx"&gt;  
  &lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div align="center"&gt;
  &lt;script&gt;
       var dialogFrame = document.getElementById("dialog");
       var dialogDocument = dialogFrame.contentWindow.document;
       var dialogResponse = dialogDocument.getElementById("server-response");
       document.write(dialogResponse);
  &lt;/script&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/hmtl&gt;
  </code></pre>
  
  <p>I'm expecting to extract text responded by Dialogflow, but the result is <code>null</code>.</p>