W3C home > Mailing lists > Public > public-coremob@w3.org > August 2012

Re: ACTION-23 - Draft a proposal to drop online events from HTML5

From: Chaals McCathieNevile <w3b@chaals.com>
Date: Tue, 28 Aug 2012 13:42:47 +0300
To: public-coremob@w3.org, "James Graham" <jgraham@opera.com>
Message-ID: <op.wjqyplh222x22q@pc-bbq051.wlan.inet.fi>
On Tue, 28 Aug 2012 13:00:33 +0300, James Graham <jgraham@opera.com> wrote:

> On 08/28/2012 11:24 AM, Andrew Betts wrote:
>
>> OK, well, that would translate into this I guess:
>>
>> PROPOSED RESOLUTION: The CG encourages the standards committee for HTML5
>> to issue non-normative guidance to developers as part of the HTML5 spec,
>> advising that online events and a window.navigator.onLine value of true
>> indicates, rather than that the user agent is online, that the user
>> agent has no knowledge of the connection state.  In short, that false
>> means the UA is offline, while true means nothing.
>>
>> If members feel that there is appetite for a better syntax, we could
>> instead adopt this:
>>
>> PROPOSED RESOLUTION: The existing navigator.onLine property and the
>> online and offline events should be deprecated and replaced by
>> navigator.offLine (with an exactly opposing definition) and the events
>> offlineStart and offlineEnd, which will fire based on the same logic as
>> currently underlies the offline and online events, respectively.
>>
>> But I feel it's probably not worth it.

If there is any serious legacy content relying on navigator.online, then  
this deals with the problem of compatibility by not re-defining them. If  
there isn't any content out there, then this is straightforward.

>> Incidentally, does anyone else
>> think the capitalisation of navigator.offLine is weird, and inconsistent
>> with the (probably more sensible) event names?

Yep.

> FWIW I recommend just writing an email to whatwg@whatwg.org [1] or  
> filing a bug on the HTML spec clearly describing the problem with the  
> online event. I doubt that phrasing it in terms of a "CG resolution"  
> will have any impact at all; the important thing is that the relevant  
> facts are presented. In this case the relevant facts seem to be that the  
> event is inherently unreliable for detecting whether the browser is  
> online or not, and so it can't be used to fulfil use cases that depend  
> on that. If you have use cases where knowing that the browser is  
> for-sure offline even if you don't know if it is for-sure online would  
> be good enough, present those and then suggest an offline event as a  
> possible solution.

This is pretty important in any case.

> [1] The HTMLWG are much less likely to make substantive changes now  
> since they are aiming to get to Rec. rather than be maximally  
> technically useful.

This strikes me as likely to be nonsense. If the whatwg is likely to make  
this change and it fixes an existing bug, it is quite possible the HTML-WG  
will do the same. In any event, it seems sensible to record the bug  
against the HTML spec too. If it isn't taken in for HTML5, there is no  
reason it would not be used in HTML.next - or that a navigator.offline  
property (the useful one) could not be added to that.

cheers


-- 
Chaals - standards declaimer
Received on Tuesday, 28 August 2012 10:43:15 UTC

This archive was generated by hypermail 2.3.1 : Friday, 19 April 2013 17:36:47 UTC