title: How do I get DOM from Chrome Remote Debugging
body: <p>I've been trying to get the DOM object with Chrome Remote Debugging using chrome-remote-interface with no luck (code is in node.js)</p>
  
  <pre><code>var Chrome = require('chrome-remote-interface')
  
  Chrome(function (chrome) {
    chrome.on('Page.loadEventFired', function(evt) {
      console.log('load event fired')
      chrome.DOM.getDocument(null, function(resp) {
        console.log('DOM DOC')
        console.log(resp)   
      })
      chrome.DOM.getOuterHTML({}, function(resp) {
        console.log('outerhtml')
        console.log(resp)
      })
    })
    chrome.Debugger.enable()
    chrome.DOM.enable()
    chrome.Network.enable()
    chrome.Page.enable()
    chrome.Page.navigate({'url': 'https://github.com'})    
  }).on('error', function () {
    console.error('Cannot connect to Chrome')
  })
  </code></pre>
  
  <p>When running the file I've got these output</p>
  
  <pre><code>load event fired
  DOM DOC
  false
  outerhtml
  true
  </code></pre>