W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Proposal to extend registerProtocolHandler

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 1 Aug 2011 19:53:06 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1108011934050.1701@ps20323.dreamhostps.com>
On Tue, 26 Jul 2011, James Kozianski wrote:
> 
> Here are the use cases I had in mind:
> 
> 1. Allow sites to conditionally show UI to promote the advantages of
> registering the site as a handler.
>    (requires isRegistered)
> 
> 2. Allow sites to provide settings screens which allow users to register
> / deregister handlers from within the site.
>    (requires isRegistered, and deregisterProtocolHandler)
> 
> The presence of an ignored list - sites who don't have permission to use 
> registerProtocolHandler - necessitates Michael Davidson's suggestion 
> that isRegistered() should return a tri-state value (REGISTERED, 
> DECLINED, NOTASKED). Otherwise sites that have been 'ignored' by a user 
> won't be able to tell if they should show their promotional UI or not.

Could you elaborate on what kind of UI we'retrying to enable here?

Based on the above use cases, it seems the API that directly addresses 
them is:

   navigator.shouldShowHandlerPromo('mailto:') => true/false

   navigator.getCurrentHandlerState('mailto:') =>
      'display UI to unregister'
      'display UI to register'
      'tell user browser-specific way to re-enable previously declined 
       registration' (?)

   navigator.unregisterHandler('mailto:')

...and equivalent for MIME types. Is that really all that is needed here?

(Ignore the names of the methods, they're not the names I'd use.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 1 August 2011 12:53:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC