You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(if the serialized object) has an own property named "toJSON" that is a Function (...) return success with the value returned by Function.[[Call]](toJSON) with value as the this value.
The standard does not mention what to do with inherited property toJSON of the serialized object. Would it make sense to handle toJSON uniformly for both own and inherited toJSON property?
Use case:
According to the ECMAScript standard toJSON is an inherited property of Date object defined in Date.prototype. As it is not an own property we have to serialize Date as an object instead of calling Date.prototype.toJSON
Implementations:
ChromeDriver
The serialization of Date object used to call Date.prototype.toJSON until ver 111
Starting from ver 111 ChromeDriver serializes Date as Object yielding {}. The result seems to be unexpected for the users chromedriver:4395.
GeckoDriver
It looks like it also calls Date.prototype.toJSON as the serialization result is a string of the form YYYY-MM-DDTHH:mm:ss.sssZ (ISO8601)
The text was updated successfully, but these errors were encountered:
According to the internal JSON clone algorithm:
The standard does not mention what to do with inherited property toJSON of the serialized object. Would it make sense to handle toJSON uniformly for both own and inherited toJSON property?
Use case:
According to the ECMAScript standard toJSON is an inherited property of Date object defined in Date.prototype. As it is not an own property we have to serialize Date as an object instead of calling Date.prototype.toJSON
Implementations:
ChromeDriver
GeckoDriver
It looks like it also calls Date.prototype.toJSON as the serialization result is a string of the form YYYY-MM-DDTHH:mm:ss.sssZ (ISO8601)
The text was updated successfully, but these errors were encountered: