Web Share API
Web Share API
https://w3c.github.io/web-share/
Web Share API, W3C Editor's Draft 15 April 2020
https://www.w3.org/TR/web-share/
Web Share API, W3C First Public Working Draft 17 December 2019
https://github.com/w3c/web-share/
shareButton.addEventListener("click", async () => {
try {
await navigator.share({ title: "Example Page", url: "" });
console.log("Data was shared successfully");
} catch (err) {
console.error("Share failed:", err.message);
}
});
demo
https://codepen.io/xgqfrms/full/MWapyZq
test
https://w3c-test.org/web-share/
https://wangdoc.com/webapi/web-share-api.htm
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12767524.html
未经授权禁止转载,违者必究!