[whatwg] Proposal to extend registerProtocolHandler

James Kozianski koz at chromium.org
Mon Aug 8 23:29:51 PDT 2011

On Tue, Aug 2, 2011 at 5:53 AM, Ian Hickson <ian at hixie.ch> wrote:

> 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.)

shouldShowHandlerPromo() seems to capture the intent of the isRegistered()
function quite well. I can't think of any valid use cases apart from showing
promotional UI. A concrete example of the kind of UI we're trying to enable
is gmail's notifications UI [1].

getCurrentHandlerState() also seems to be fine. The intended result is that
a web developer can have something like a settings page that lets users
modify their protocol handler settings for that site, eg a form with radio
buttons for enable / disable. Again, gmail has an example of the UI we'd
like to enable [2].



More information about the whatwg mailing list