Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #27726

Re: Javascript TEL: URI support detection

Newsgroups comp.lang.javascript
Date 2015-05-17 22:01 -0700
References <mj9jm9$tj0$1@speranza.aioe.org>
Message-ID <ccc9cb83-e4b1-4fa7-a52f-3885f6c6d0c3@googlegroups.com> (permalink)
Subject Re: Javascript TEL: URI support detection
From "Michael Haufe (TNO)" <tno@thenewobjective.com>

Show all headers | View raw


On Sunday, May 17, 2015 at 3:32:18 AM UTC-5, Richard Maher wrote:
> I've googled around and cannot find a reliable way to detect Browser and 
> Device support for "TEL:" URIs with Javascript.
> 
> If it's a mobile phone then the anchor link works as expected. But if 
> it's a PC without telephone and voice capability it just fails silently :-(
> 
> What solution(s) are you using?

Short answer is that this is not possible by design. Long answer is guesswork and hackish:

All I could think of is to attach an onclick listener to the link(s), then when they are clicked on attach an onblur event to the window plus a short timer of say a couple seconds that will clean itself up.

If the window blurs, you can guess with some probability that some application registered to that protocol took control. If after a short period of time (mentioned above) nothing took window focus, assume protocol is not supported

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-17 16:32 +0800
  Re: Javascript TEL: URI support detection "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-17 11:32 +0200
    Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-17 19:12 +0800
      Re: Javascript TEL: URI support detection Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-19 21:59 +0200
  Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-17 22:01 -0700
    Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-18 18:53 +0800
      Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-18 08:53 -0700
        Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-19 21:13 +0800
          Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-19 14:08 -0700
            Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-21 06:10 +0800
              Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-31 13:12 +0800
                Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-01 18:52 +0800
                Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-10 18:49 -0700
                Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-13 08:15 +0800
                Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-22 06:07 +0800
                Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-22 06:08 +0800
                Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-24 14:09 -0700
                Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-25 18:54 +0800
                Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-25 06:40 -0700
                Re: Javascript TEL: URI support detection ittsmith1@gmail.com - 2015-07-20 18:57 -0700

csiph-web