This repository was archived by the owner on Jul 5, 2025. It is now read-only.
This repository was archived by the owner on Jul 5, 2025. It is now read-only.
page.onCallback() does not handle dates #52
Open
Description
TrifleJS is using JSON.stringify() to copy objects from IE context to the V8 runtime where test scripts are executed. Thus if you do something like this:
page.onCallback = function(theDate, theType) {
console.log(theDate, theType);
}
page.evaluate(function(date) {
window.callPhantom(date, typeof date);
}, new Date());
You will recieve:
[
"2015-03-08T03:05:10.294Z",
"object"
]
Meaning that IE gets an object, but sends back a ISO date string.
Please investigate actual behaviour in PhantomJS and add some unit tests.