WICG / netinfo

https://wicg.github.io/netinfo/
Other
95 stars 24 forks source link

Support .toJSON() on NetworkInformation interface #77

Open jakub-g opened 5 years ago

jakub-g commented 5 years ago

In Chrome 72:

> JSON.stringify(navigator.connection)
{}

It seems useful to define standard .toJSON() on NetworkInformation as for example PerformanceEntry is doing, so that stringify shows something useful. https://www.w3.org/TR/performance-timeline-2/#dom-performanceentry-tojson

When toJSON is called, run [WebIDL]'s default toJSON operation.