I am wondering if there is any benefit using url
over text
on the Web Share API?
Let me explain why I am asking this:
I am using the Web Share API to share a URL to my website accompanied with some text like this:
navigator.share({
title: 'Foobar',
text: 'Foo foo bar bar!',
url: 'https://example.com'
})
It works perfectly fine. Except for some long existing bug on iOS Safari that prevents the URL specified in the options.url
from being pasteable in for example an input
or textarea
element. Which renders its functionality partially useless.
Now, a workaround would be to just put the link in the options.text
like this instead:
navigator.share({
title: 'Foobar',
text: 'Foo foo bar bar! https://example.com',
})
So there's that. But I couldn't find any information on the possible drawbacks this workaround might have.