You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
The maybeAddProtocolAndHostname_(opt_uri) method prepends the uri with http:// and then passes the value to the parse method which is trying to create a new URL(opt_uri) with the original protocol and the http//: protocol prepending it.
For example, if href="tel:123-123-1234" it will try to create a new URL(opt_uri) where opt_uri = "http://tel:123-123-1234".
This will cause the following JS error to occur: Uncaught TypeError: Failed to construct 'URL': Invalid URL
As of now, I know that this is an issue for the following protocol handlers:
tel
mailto
skype
I ran into this issue while trying to utilize an anchor to navigate to an application via sennaJS.
The text was updated successfully, but these errors were encountered:
kienD
changed the title
JS error will occur when when using the URI constructor with a protocol handler like tel or mailto
JS error will occur when using the URI constructor with a protocol handler like tel or mailto
Mar 27, 2017
The
maybeAddProtocolAndHostname_(opt_uri)
method prepends the uri withhttp://
and then passes the value to theparse
method which is trying to create anew URL(opt_uri)
with the original protocol and thehttp//:
protocol prepending it.For example, if
href="tel:123-123-1234"
it will try to create anew URL(opt_uri)
whereopt_uri = "http://tel:123-123-1234"
.This will cause the following JS error to occur:
Uncaught TypeError: Failed to construct 'URL': Invalid URL
As of now, I know that this is an issue for the following protocol handlers:
I ran into this issue while trying to utilize an anchor to navigate to an application via sennaJS.
The text was updated successfully, but these errors were encountered: