The Web Share API In Chrome 89
Intro: 4/3/21 - Chrome Web Devs Announced The Chrome Version 89! (Stable)
They Added Some Features, A New Navigator API Has Been Added - navigator.share()
.
Refer To: developer.chrome.com
Video:
As Per The Video, The API Was Supported On Chrome Mobile Version.
To update Chrome: Click On 3 Dots
Then Hover Over HelpThen Click On About ChromeThen Click on Update Chrome, It Will Take Some Time To update And then Click On Relaunch ChromeYour Chrome Should Be Updated To Version 89 Or This Code Will Not Work, Try To Run The Code By Clicking A Button Or It May Give A Must be handling a user gesture to perform a share request Error
Try It Out:
if("share" in navigator){
navigator.share({
title: "Coding Articles - Dev.to",
text: "Dev.to",
url: 'https://dev.to'
});
}
Top comments (0)