[whatwg] Proposal to extend registerProtocolHandler

Ian Hickson ian at hixie.ch
Mon Aug 1 12:53:06 PDT 2011

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' (?)


...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.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list