mirror of https://github.com/vitalif/phantomjs
Fix passing date as argument to page.evaluate().
https://github.com/ariya/phantomjs/issues/126152.0
parent
32d20b4aa7
commit
806da21e2b
|
@ -370,9 +370,11 @@ function decorateNewPage(opts, page) {
|
||||||
switch (argType) {
|
switch (argType) {
|
||||||
case "object": //< for type "object"
|
case "object": //< for type "object"
|
||||||
case "array": //< for type "array"
|
case "array": //< for type "array"
|
||||||
case "date": //< for type "date"
|
|
||||||
str += JSON.stringify(arg) + ","
|
str += JSON.stringify(arg) + ","
|
||||||
break;
|
break;
|
||||||
|
case "date": //< for type "date"
|
||||||
|
str += "new Date(" + JSON.stringify(arg) + "),"
|
||||||
|
break;
|
||||||
case "string": //< for type "string"
|
case "string": //< for type "string"
|
||||||
str += quoteString(arg) + ',';
|
str += quoteString(arg) + ',';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue