W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2014

Re: [whatwg] Proposal: navigator.launchURL

From: Adam Barth <w3c@adambarth.com>
Date: Sun, 13 Jul 2014 22:30:11 -0700
Message-ID: <CAJE5ia8gMFkuexFazHkMnP89bE4Bx1xxGBYnzQS0CLF5Q5vd=Q@mail.gmail.com>
To: "Michael[tm] Smith" <mike@w3.org>
Cc: whatwg@whatwg.org, Konstantin Welke <Konstantin.Welke@citrix.com>, Ben Johnson <Ben.Johnson@citrix.com>
On Sun, Jul 13, 2014 at 8:05 PM, Michael[tm] Smith <mike@w3.org> wrote:
> Adam Barth <w3c@adambarth.com>, 2014-07-13 19:26 -0700:
>
>> == Use Case ==
>>
>> A web site wants to launch an external protocol handler.  For example,
>> a web site might want to launch PuTTY via the "ssh" scheme.
> [...]
>> == Proposal ==
>>
>> partial interface NavigatorContentUtils {
>>   void launchURL(DOMString url);
>> };
>
> Did you see the similar proposal that came up for discussion back in March?
>
>   http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/thread.html#msg791
>   http://bengjohnson.github.io/ExternalProtocolSpecification.html
>
> It also used the example of launching an SSH client:
>
>   http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0797.html
>
> It proposed a method that includes a "successCallback" & "noHandlerCallback":
>
>   navigator.launchUri(uri, successCallback, noHandlerCallback)

No, I missed that.  Looks very similar.  A more modern idiom would be
to return a promise to inform the caller of success or failure.

Is there a use case for reporting success or failure?  I thought about
including that, but it wasn't necessary for the use cases I'm aware
of.  We can always extend the API with a returned promise in the
future if more use cases arise.

Adam
Received on Monday, 14 July 2014 05:31:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC