mirror of https://github.com/vitalif/phantomjs
Merge pull request #93 from corgibytes/open-with-post-without-load-handler
Allow calling WebPage.open with HTTP verb, but without load handler1.3
commit
07f946d817
|
@ -40,10 +40,16 @@ window.WebPage = function() {
|
|||
this.onLoadFinished = arguments[1];
|
||||
this.openUrl(arguments[0], 'get', this.settings);
|
||||
return;
|
||||
} else if (arguments.length === 3) {
|
||||
} else if (arguments.length === 3 && typeof arguments[2] === 'function') {
|
||||
this.onLoadFinished = arguments[2];
|
||||
this.openUrl(arguments[0], arguments[1], this.settings);
|
||||
return;
|
||||
} else if (arguments.length ===3) {
|
||||
this.openUrl(arguments[0], {
|
||||
operation: arguments[1],
|
||||
data: arguments[2]
|
||||
}, this.settings);
|
||||
return;
|
||||
} else if (arguments.length === 4) {
|
||||
this.onLoadFinished = arguments[3];
|
||||
this.openUrl(arguments[0], {
|
||||
|
|
Loading…
Reference in New Issue