Re: [whatwg] Proposal: navigator.launchURL

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