Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Remove the deprecated phantom.args #12527

Closed
ariya opened this issue Aug 31, 2014 · 0 comments
Closed

Remove the deprecated phantom.args #12527

ariya opened this issue Aug 31, 2014 · 0 comments

Comments

@ariya
Copy link
Owner

ariya commented Aug 31, 2014

The use of phantom.args has been deprecated (see commit 545a3f7) since a long time ago (version 1.5, March 2012). It is time to remove it in the upcoming major version PhantomJS 2.

Any old scripts need to switch to use System#args instead.

// old API
console.log('First argument is', phantom.args[0]);
console.log('Second argument is', phantom.args[1]);
phantom.exit();
// new API
var system = require('system');
console.log('First argument is', system.args[1]);
console.log('Second argument is', system.args[2]);
phantom.exit();
ariya added a commit that referenced this issue Aug 31, 2014
The use of phantom.args has been deprecated (see commit 545a3f7)
since a long time ago (version 1.5, March 2012). Any old scripts
need to switch to use System#args instead.

#12527
@ariya ariya closed this as completed Sep 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant