Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Cool! Got it working using the page.onCallback and page.onConsoleMessage listeners. Incidentally, since I’m now listening to all console messages, I see lots of warnings like this: Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL about:blank. Domains, protocols and ports must match. Is this normal? Commented Apr 13, 2015 at 11:05
  • If you're using 1.9.8, then it is. It's simply a bug in PhantomJS that was introduced in version 1.9.8. It doesn't do anything and is only bad if you need clean output. I suggest that you update to PhantomJS 2. Commented Apr 13, 2015 at 11:08