如果Web Share Target API可用,我想教给用户不同的流程。有没有办法检测它是否可用?
答案 0 :(得分:0)
if (navigator.share === undefined) {
console.log('Error: Unsupported feature: navigator.share');
}
if (navigator.share === undefined) {
alert('Error: Unsupported feature: navigator.share');
}