1

Just crawling a web page like github.com I hit the famous TypeError: 'undefined' is not a function.

var page = require('webpage').create();
page.open('https://github.com', function() {
  phantom.exit();
});

See https://groups.google.com/forum/#!msg/phantomjs/r0hPOmnCUpc/uxusqsl2LNoJ

So exactly how do you fix this problem for someone totally new to PhantomJS?

Do I git clone curjojs/poly and then wrap all my PhantomJS code under poly/function like https://stackoverflow.com/a/19521355/230884?

I don't see any official documentation on solving this particular issue.

Community
  • 1
  • 1
CppLearner
  • 16,273
  • 32
  • 108
  • 163
  • Yeah your need to shim bind. PhantomJS is built with QTwebkit and it doesnt support bind. – mpm May 11 '14 at 02:09

0 Answers0