Open colelawrence opened 10 years ago
Note that this may require a newer version of phantom
, which depends on a newer version of dnode
which supports optional weak
.
I'm glad you've found it to be useful!
Check out the features/constructor-opts
branch. If that's what you need, I'll merge it into master and npm publish
. The tests pass and it looks right in the REPL.
Here's how I tested:
# Use the mock to unobtrusively probe the create constructor args
mock = new require('./test/mock-phantom').Phantom
mock.on('create', (opts) -> console.log('PhantomJS options', opts))
phantom = require('./index').inject(mock)
strat = new phantom.NewPhantomAndPort
strat.phantomOpts = {dnode: {weak: false}}
phantom.connectWith(strat)
phantom.create().select('#SomeId').from('example.com').process(->).execute()
For running on windows without complex node-gyp building it is required that you pass
{ dnodeOpts: { weak: false } }
to thephantom.create
function. https://github.com/sgentle/phantomjs-node#use-it-in-windowsSo it would be a nice feature to have to either pass some options over fluent, or just pass an
{ dnodeOpts: { weak: false } }
toggle. This work is incredible, thanks.