krakenjs / post-robot

Cross domain post-messaging on the client side using a simple listener/client pattern.
Apache License 2.0
741 stars 92 forks source link

Serializing Date objects? #50

Closed cyanCYMK closed 5 years ago

cyanCYMK commented 6 years ago

Does post-robot support sending Date objects? Just tried to return a date object within an object and found that it returns an empty object. It looks like perhaps there is a minimal check if (typeof item == "object") which will be true for Date objects. Should it have a stronger check like item.constructor === Object and throw an error if false?

bluepnume commented 5 years ago

This is supported now.