New issue
Advanced search Search tips

Issue 776229 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 368358
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

NetInfo's navigator.connection.type is undefined

Project Member Reported by paulir...@chromium.org, Oct 19 2017

Issue description

    navigator.connection.type

Evaluate this on desktop Chrome. Tested on OSX in stable and canary.
The value is undefined, regardless of actual state.

At the very least this regressed  issue 581334  (and 567613), where the netinfo api was updated when DevTools was changed.

Currently the online/offline DOM events and navigator.onLine property continue to work, but the previous changes made to navigator.connection.type are unobservable as the property isn't there. 



Related  Issue 727911 : Simulating the connection quality using devtools should also change the rtt and downlink estimates	
 
Cc: jkarlin@chromium.org
Cc: igrigo...@chromium.org
Spoke with Tarun briefly on IM.

Found these two blink-dev threads:

* (2015) Intent to Ship: Network Information navigator.connection.downlinkMax and onchange event https://groups.google.com/a/chromium.org/d/topic/blink-dev/tU_Hqqytx8g/discussion
* (2017) Intent to Ship: NetInfo API extension for network quality
https://groups.google.com/a/chromium.org/d/topic/blink-dev/UVfNMH50aaQ/discussion


----------


I have a build of Chrome 53 here. In this build, navigation.connection.type === 'unknown'

And in Chrome 53 - 60, the type would change to 'none' when offline was emulated with DevTools.  (see screenshot)


I'd argue that on desktop, continuing to use 'unknown' is required, by spec, in contrast to leaving it undefined. Also the spec indicates type==='none' is "equivalent to navigator.onLine === false", so it seems necessary to restore the previous behavior this property had.

-------------

FWIW, this report comes from this developer who was surprised by the change: https://bugs.chromium.org/p/chromium/issues/detail?id=423246#c31


Screen Shot 2017-10-18 at 6.27.19 PM.png
208 KB View Download
Summary: NetInfo's navigator.connection.type is undefined (was: Netinfo connection.type is undefined on desktop)
navigator.connection.type is undefined because that particular attribute didn't get approval to ship on desktop yet. See https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/network$20information$20jkarlin%7Csort:date/blink-dev/sTtZIk4XkaY/6hsgFrQDAgAJ where the thread resumes in May of 2017.
Cc: -jkarlin@chromium.org tbansal@chromium.org
Owner: jkarlin@chromium.org
Status: Assigned (was: Untriaged)
Assigning to jkarlin@ for triage.
Mergedinto: 368358
Status: Duplicate (was: Assigned)
Duping to the launch bug.

Sign in to add a comment