title: How to load an HTML string to nodejs module phantomjs-node
body: <p>I use <a href="https://github.com/sgentle/phantomjs-node" rel="nofollow">this</a> nodejs module for parsing HTML. I'm trying to find element by id in my HTML. And I can't get document object. Here is my code:</p>
  
  <pre><code>var phantom = require('phantom');
  var fs = require('fs');
  
  phantom.create(function (ph) {
      ph.createPage(function (page) {
          page.open('file://' + __dirname + '/content.txt', function (status) {
              page.evaluate(function() {
                  // this code will never executed
                  document.getElementById('some_id');
              });
  
              ph.exit();
          });
      });
  }, {
      dnodeOpts: {
          weak: false
      }
  });
  </code></pre>