WICG / netinfo

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

downlinkMax type #40

Closed stefhak closed 8 years ago

stefhak commented 8 years ago

Hi, downlinkMax has type "Megabit", but the table lists "+Infinity" as a valid value. My real problem is that in testing the browser reports Infinity but JSON stringify translates that to null. I can easily work around, just wanted to raise this.

marcoscaceres commented 8 years ago

unfortunately, that's a limitation of JSON :( Not much we can do about this, but thanks for raising it.

stefhak commented 8 years ago

Just wondering why a type like "unsigned long" or "double" or something like that was not chosen.

marcoscaceres commented 8 years ago

@stefhak, IIRC, because we wanted it to return +Infinity for when there was a determined connection, but we didn't know (or wanted to obscure), the connection speed.